Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==75998==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c0000006c0 at pc 0x0000004db7b2 bp 0x7ffc448e67d0 sp 0x7ffc448e5f80 READ of size 192 at 0x60c0000006c0 thread T0 #0 0x4db7b1 (/out/package/ex5+0x4db7b1) #1 0x515153 (/out/package/ex5+0x515153) #2 0x51605d (/out/package/ex5+0x51605d) #3 0x7fb9ab504b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #4 0x41ca39 (/out/package/ex5+0x41ca39) 0x60c0000006c0 is located 0 bytes to the right of 128-byte region [0x60c000000640,0x60c0000006c0) allocated by thread T0 here: #0 0x4dcd70 (/out/package/ex5+0x4dcd70) #1 0x5194fd (/out/package/ex5+0x5194fd) #2 0x516016 (/out/package/ex5+0x516016) #3 0x7fb9ab504b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/ex5+0x4db7b1) Shadow bytes around the buggy address: 0x0c187fff8080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa 0x0c187fff8090: f
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
-28 -28 46 -28 39 46 -28 -16 39 46 -28 -16 39 46 59 -28 -16 22 39 46 59 -68 -28 -16 22 39 46 59 -68 -28 -16 22 39 46 59 -68 -28 -16 22 30 39 46 59 -68 -28 -16 22 30 39 46 59 -68 -44 -28 -16 22 30 39 46 59 -68 -44 -28 -16 -5 22 30 39 46 59 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -92 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -92 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -92 -82 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -61 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -61 -44 -35 -28 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -35 -28 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -38 -35 -28 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39 46 59 83 -94 -92 -82 -80 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39 46 59 83 -94 -92 -90 -82 -80 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39
JOJ Answer
-28 -28 46 -28 39 46 -28 -16 39 46 -28 -16 39 46 59 -28 -16 22 39 46 59 -68 -28 -16 22 39 46 59 -68 -28 -16 22 39 46 59 -68 -28 -16 22 30 39 46 59 -68 -28 -16 22 30 39 46 59 -68 -44 -28 -16 22 30 39 46 59 -68 -44 -28 -16 -5 22 30 39 46 59 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -92 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -92 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -92 -82 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -61 -44 -35 -28 -16 -5 22 30 39 46 59 -94 -92 -82 -68 -61 -44 -35 -28 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -35 -28 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -38 -35 -28 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39 46 59 83 -94 -92 -82 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39 46 59 83 -94 -92 -82 -80 -68 -61 -44 -38 -35 -28 -27 -16 -5 22 30 39 46 59 83 -94 -92 -90 -82 -80 -68 -61 -44 -38 -