Record Case Detail

Notes

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

Stderr

/in/ex4.c:44:36: runtime error: index 201 out of bounds for type 'int [200]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/ex4.c:44:36 in 
=================================================================
==76564==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffea5626b40 at pc 0x0000004a9029 bp 0x7ffea55ff7f0 sp 0x7ffea55fefa0
WRITE of size 4 at 0x7ffea5626b40 thread T0
    #0 0x4a9028  (/out/package/ex4+0x4a9028)
    #1 0x4aa2b7  (/out/package/ex4+0x4aa2b7)
    #2 0x4aa396  (/out/package/ex4+0x4aa396)
    #3 0x5155d1  (/out/package/ex4+0x5155d1)
    #4 0x515087  (/out/package/ex4+0x515087)
    #5 0x7f1b9f464b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #6 0x41cb59  (/out/package/ex4+0x41cb59)

Address 0x7ffea5626b40 is located in stack of thread T0 at offset 160032 in frame
    #0 0x51519f  (/out/package/ex4+0x51519f)

  This frame has 6 object(s):
    [32, 160032) 'all' (line 12) <== Memory access at offset 160032 overflows this variable
    [160288, 320288) 'A' (line 13)
 

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


        

JOJ Answer

STDOUT START
-32 65 26 -39 -2 59 -35 -111 128 16 -31 63 -57 72 100 -16 31 70 170 80 9 -66 -147 -52 -88 -19 122 134 100 -38 34 -159 -96 47 40 -19 5 -72 25 -58 -61 -130 91 107 -51 85 65 95 -42 46 -56 -57 82 -75 74 9 75 -17 60 25 104 -134 10 70 63 -138 115 82 15 73 -42 103 -25 -76 -42 -144 13 14 -50 59 -96 89 -107 62 105 -48 -79 36 -133 -86 -90 72 74 -36 0 36 29 -116 32 -60 -41 -104 -70 56 59 31 10 -42 -121 54 24 -96 20 91 142 144 -8 25 57 -39 -14 -7 32 -139 -14 36 80 -132 8 -122 73 181 88 36 -13 143 -13 62 -123 -37 37 -76 -6 -54 115 116 -176 85 -40 -98 67 -39 14 95 -47 -5 1 -34 75 19 -163 -109 -17 -3 74 126 -119 58 80 -80 75 -120 -50 161 -42 3 -53 149 112 69 -115 112 -43 -1 34 46 126 -88 -31 98 -19 161 -51 -127 53 -88 21 79 20 60 74 107 20 68 6 -61 97 -50 46 -6 -27 -23 -8 108 -37 -77 -12 41 23 -152 41 123 -81 -3 58 35 -56 60 30 113 -36 -63 -60 1 -10 -145 6 21 -106 12 64 90 -148 -46 -125 -40 -80 84 169 0 -52 -88 24 -97 23 29 -19 -66 44 15 80 -96 40 -107 44 -113 7 96 -9 56 93 -15 72 -131 101 -110 57 -25 141 -110