Record Case Detail

Notes

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

Stderr

/in/ex4.c:7:17: runtime error: index 1051 out of bounds for type 'char [1050][520]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/ex4.c:7:17 in 
=================================================================
==49975==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffeb1f22174 at pc 0x00000048e280 bp 0x7ffeb1e9ca30 sp 0x7ffeb1e9c1e0
READ of size 104 at 0x7ffeb1f22174 thread T0
    #0 0x48e27f  (/out/package/ex4+0x48e27f)
    #1 0x48e8f9  (/out/package/ex4+0x48e8f9)
    #2 0x51576b  (/out/package/ex4+0x51576b)
    #3 0x514f97  (/out/package/ex4+0x514f97)
    #4 0x7f24ae92cb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x41ca69  (/out/package/ex4+0x41ca69)

Address 0x7ffeb1f22174 is located in stack of thread T0 at offset 546388 in frame
    #0 0x5150af  (/out/package/ex4+0x5150af)

  This frame has 5 object(s):
    [32, 546032) 's' (line 5)
    [546288, 546388) 's0' (line 5)
    [546432, 1628032) 'a' (line 5) <== Memory access at offset 546388 partially underflows this varia

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