Notes
This function is in beta test. Please help improve it in the issues
here.
/in/ex4.c:43:35: runtime error: index 200 out of bounds for type 'int [200][200]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/ex4.c:43:35 in ================================================================= ==78498==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffde29f2e60 at pc 0x0000004a9029 bp 0x7ffde29cbb70 sp 0x7ffde29cb320 WRITE of size 4 at 0x7ffde29f2e60 thread T0 #0 0x4a9028 (/out/package/ex4+0x4a9028) #1 0x4aa2b7 (/out/package/ex4+0x4aa2b7) #2 0x4aa396 (/out/package/ex4+0x4aa396) #3 0x515455 (/out/package/ex4+0x515455) #4 0x515087 (/out/package/ex4+0x515087) #5 0x7f284b6bab96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #6 0x41cb59 (/out/package/ex4+0x41cb59) Address 0x7ffde29f2e60 is located in stack of thread T0 at offset 160032 in frame #0 0x51519f (/out/package/ex4+0x51519f) This frame has 4 object(s): [32, 160032) 'all' (line 7) <== Memory access at offset 160032 overflows this variable [160288, 320288) 'A' (line 8
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 158 -41 -77 -122 95 121 -33 9 44 56 136 -77 -21 108 -8 -29 -41 83 63 122 -168 89 30 69 -117 -84 -170 78 16 -52 -93 -40 -144 3 -17 -14 2 -82 -27 133 -2 51 33 57 51 134 -72 7 68 45 154 70 40 124 -26 -53 -50 11 -1 66 16 31 104 22 -126 -100 62 -37 85 -30 131 -107 179 -190 -41 122 34 113 32 38 -9 -56 54 26 90 115 50 -97 -146 -103 18 106 0 -134 103 -5 83 79 111 -101 66 -15 -49 -101 48 70 11 -66 89 35 77 43 5 109 -34 -47 65 88 -88 -23 45 118 -121 -131 2 4 -5 -1 -14 55 -60 -143 -118 -140 -148 -90 -8 3 -27 -30 -57 -98 26 108 -67 -5 -72 -102 -92 38 32 0 72 -35 -96 -138 133 55 41 -31 -117 -156 105 23 -96 -24 110 -147 14 -25 125 -146 -150 154 -72 -27 173 69 -27 14 -89 87 113 -113 -56 101 -169 -19 12 -24 30 80 -45 -75 -62 -198 98 18 -51 -17 -45 32 13 -17 -119 22 133 -69 43 39 16 109 -64 -31 54 55 -178 112 -169 10 -86 97 -36 -104 -115 -80 89 32 -89 128 -34 168 45 -75 127 75 140 20 -151 44 81 3 -127 -58 -32 -143 -162 -21 31 1 69 28 66 -129 82 -135 18 26 30 144 92 -2 81 -84 -1 64 -71 -132 -74 -34 -162 100 5