Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==9159==ERROR: LeakSanitizer: detected memory leaks Direct leak of 72 byte(s) in 3 object(s) allocated from: #0 0x517480 (/out/package/test_part1_memcheck+0x517480) #1 0x52cadd (/out/package/test_part1_memcheck+0x52cadd) #2 0x52d45a (/out/package/test_part1_memcheck+0x52d45a) #3 0x7fa845567b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 72 byte(s) in 3 object(s) allocated from: #0 0x517480 (/out/package/test_part1_memcheck+0x517480) #1 0x52cadd (/out/package/test_part1_memcheck+0x52cadd) #2 0x52ca65 (/out/package/test_part1_memcheck+0x52ca65) #3 0x52d45a (/out/package/test_part1_memcheck+0x52d45a) #4 0x7fa845567b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 72 byte(s) in 3 object(s) allocated from: #0 0x517480 (/out/package/test_part1_memcheck+0x517480) #1 0x52cadd (/out/package/test_part1_memcheck+0x52cadd) #2 0x52ca65 (/out/package/test_part1_memche
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
615 1 -815
JOJ Answer
615 1784 423 1 816 -1966 -194 -1593 1885 1117 -384 561 1649 -1826 -1935 -1576 -57 -728 -815 1938 -1549 -955 1060 -696 -1641 -1802 -179 230 -820 -802 -1414 1166 -1965 -1207 -31 1966 1389 1893 -1734 756 -879 224 -1483 -1963 -744 -294 -1829 -480 -1052 -640 -1832 -1806 894 1966 291 -979 -1432 -1595 -1910 111 198 625 1208 1253 534 1938 993 1011 9 -1427 -1589 1901 640 4 -178 -1103 644 -508 -3 -338 112 -1379 -1770 1569 -114 1057 800 -1618 -595 -1952 -1379 565 -579 348 -300 904 -1089 1708 1390 1878 -100 -1174 -149 -245 1172 -565 1154 185 730 -776 609 -771 1649 -827 255 -210 -423 -1894 1315 -88 -680 1017 1283 1911 -947 -586 -1088 1495 931 -605 1428 1650 -16 668 -123 1653 185 -1392 1360 223 -1394 -1258 1747 1851 1933 1006 -1150 471 971 -1235 -1581 1920 1405 -1739 472 -1791 -1350 1819 -931 -834 253 846 -1880 1247 -1655 202 1597 -1751 98 1010 806 -1769 1433 -1854 -909 1284 -209 1463 862 944 -1447 789 678 1627 1220 743 -206 1584 -1695 504 -1184 1426 1445 -460 983 -1392 2 956 -1439 -1675 1935 -895 -554 -1686 625 -591 -18