Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

=================================================================
==9310==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 0x7fb0b558eb96  (/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 0x52ca81  (/out/package/test_part1_memcheck+0x52ca81)
    #3 0x52d45a  (/out/package/test_part1_memcheck+0x52d45a)
    #4 0x7fb0b558eb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 48 byte(s) in 2 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

-1316 
1294 
1468 

JOJ Answer

1683 -1316 
-114 1320 -1330 692 -1780 640 82 -1143 -395 -411 -1711 -1033 -1342 1260 1781 -43 1247 -976 -491 -339 -1992 -795 -1324 -496 -735 1663 -1322 833 -1238 405 115 -1872 -1058 1270 -626 -759 1458 683 -90 802 1023 -869 1590 145 -207 1808 -1373 -528 -543 -1772 -952 165 -645 -1772 -953 374 948 -1146 -1072 1314 692 -468 -189 -1829 -406 213 651 -1295 1354 863 -1001 -575 1770 -134 -155 178 531 -258 -257 135 831 -379 -395 -268 -1728 -441 723 605 1452 -167 1171 -1539 667 1215 -1139 506 1126 1200 -1160 377 1127 1930 -1299 -1668 479 696 1687 -148 -1133 -1635 -310 1374 424 -668 -1190 -261 1569 56 -784 360 -944 1499 707 867 1192 699 1294 
-418 1902 798 1753 605 1180 -1955 -86 -1993 -1564 1311 -1459 -353 736 330 894 -9 1620 -451 -286 1977 1039 -1461 1925 -1898 -1350 1339 -157 -253 379 -687 -1527 832 -1529 1780 223 1876 -1555 586 -125 153 1052 -74 -30 1683 -1318 -1234 1851 -810 1374 1160 -515 1522 1476 1033 121 1822 722 1104 -924 1615 866 1281 -1231 -1788 1101 -352 1483 258 682 1368 -1173 1756 1635 -1480 841 -600 -692