Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
mumsh $ mumsh $ success mumsh $ p1m2.c:54:27: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1m2.c:54:27 in p1m2.c:54:4: runtime error: index 18446744073709551615 out of bounds for type 'char [1030]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1m2.c:54:4 in p1m2.c:54:4: runtime error: addition of unsigned offset to 0x7fffd081ec00 overflowed to 0x7fffd081ebff SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p1m2.c:54:4 in ================================================================= ==55898==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7fffd081ebff at pc 0x0000005155de bp 0x7fffd081ebd0 sp 0x7fffd081ebc8 WRITE of size 1 at 0x7fffd081ebff thread T0 #0 0x5155dd (/out/package/mumsh_memory_check+0x5155dd) #1 0x7f41e1804b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x41cc69 (/out/package/mumsh_memory_check+0x41cc69) Address 0x7fffd081ebff is located in
JOJ Answer
mumsh $ mumsh $ success mumsh $ exit