Record Case Detail

Notes

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

Stderr

=================================================================
==65151==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x612000000148 at pc 0x0000004db61c bp 0x7fff1d7acb60 sp 0x7fff1d7ac310
WRITE of size 4 at 0x612000000148 thread T0
    #0 0x4db61b  (/out/package/ex5+0x4db61b)
    #1 0x516cbc  (/out/package/ex5+0x516cbc)
    #2 0x516040  (/out/package/ex5+0x516040)
    #3 0x7f62d7f5ab96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #4 0x41ca39  (/out/package/ex5+0x41ca39)

0x612000000148 is located 0 bytes to the right of 264-byte region [0x612000000040,0x612000000148)
allocated by thread T0 here:
    #0 0x4dcd70  (/out/package/ex5+0x4dcd70)
    #1 0x516b69  (/out/package/ex5+0x516b69)
    #2 0x516040  (/out/package/ex5+0x516040)
    #3 0x7f62d7f5ab96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/ex5+0x4db61b) 
Shadow bytes around the buggy address:
  0x0c247fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c247fff7fe0: 00

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

-26 
-26 75 
-26 75 
-86 -26 75 
-86 -26 75 
-86 -26 75 
-99 -86 -26 75 
-99 -86 -26 75 
-99 -86 -29 -26 75 
-99 -86 -29 -26 67 75 
-99 -86 -29 -26 67 75 
-99 -86 -29 -26 50 67 75 
-99 -86 -54 -29 -26 50 67 75 
-99 -86 -54 -29 -26 50 65 67 75 
-99 -86 -54 -29 -26 50 65 67 75 
-99 -86 -54 -29 -26 50 65 67 75 
-99 -86 -60 -54 -29 -26 50 65 67 75 
-99 -86 -60 -54 -29 -26 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 30 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 30 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 30 50 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -55 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -55 -54 -29 -26 -23 27 30 65 67 75 94 
-99 -86 -60 -55 -54 -29 -26 -23 27 30 61 65 67 75 94 
-99 -86 -61 -60 -55 -54 -29 -26 -23 27 30 61 65 6

JOJ Answer

-26 
-26 75 
-26 75 
-86 -26 75 
-86 -26 75 
-86 -26 75 
-99 -86 -26 75 
-99 -86 -26 75 
-99 -86 -29 -26 75 
-99 -86 -29 -26 67 75 
-99 -86 -29 -26 67 75 
-99 -86 -29 -26 50 67 75 
-99 -86 -54 -29 -26 50 67 75 
-99 -86 -54 -29 -26 50 65 67 75 
-99 -86 -54 -29 -26 50 65 67 75 
-99 -86 -54 -29 -26 50 65 67 75 
-99 -86 -60 -54 -29 -26 50 65 67 75 
-99 -86 -60 -54 -29 -26 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 30 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 30 50 65 67 75 
-99 -86 -60 -54 -29 -26 -23 30 50 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -55 -54 -29 -26 -23 30 65 67 75 94 
-99 -86 -60 -55 -54 -29 -26 -23 27 30 65 67 75 94 
-99 -86 -60 -55 -54 -29 -26 -23 27 30 61 65 67 75 94 
-99 -86 -61 -60 -