Record Case Detail

Notes

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

Stderr

=================================================================
==9163==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 0x7f861de4eb96  (/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 0x7f861de4eb96  (/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 0x52ca81  (/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

-1442 
-247 
1812 

JOJ Answer

-1442 -1511 806 
-247 1471 1127 -1735 -1884 -1604 308 785 -809 471 449 -1601 -1432 -953 -431 -604 -894 -1814 -1636 731 -1266 1943 -1966 1279 -657 1165 1295 100 -38 -853 -1988 -919 -1701 -769 126 874 -68 1336 1414 388 -1034 -475 639 -796 -995 291 820 -1718 -1455 1210 778 -978 20 51 -1735 -267 111 793 -285 -179 -554 -1889 259 -1521 -1474 -1527 -388 -494 1911 1771 -935 489 945 1178 -1587 55 -1837 -503 -1789 1787 129 1916 122 342 -1363 122 -1036 1886 -1583 -503 -1401 7 500 -926 -684 -1280 -1766 -518 -1349 212 -225 1002 1888 -326 1629 229 937 1621 350 1240 1149 908 165 -212 474 -1482 1056 -371 628 -1761 -1113 -148 1254 -1081 -1965 -17 -1323 -1438 -1755 1192 1303 1765 894 -1987 1524 -1821 593 -187 1841 1863 724 1044 -958 1514 -959 524 435 -1306 -1497 -1856 1579 -623 -1156 -1846 -639 1255 -1366 -1949 1004 -1772 -1198 -594 -85 1459 1673 -967 621 -499 -1305 -1880 751 289 -964 -683 1511 1413 -1111 545 1646 -249 701 -1155 -460 -1212 -1564 1841 1604 -1783 -188 854 74 1108 -1154 -63 -1891 -149 -465 947 -279 -1310 165 -165