|
|
back to boardtest #4 out of bounds? In my solution I read values like this: scanf("%d %d", &px[i], &py[i]); px[i] += 1000; py[i] += 1000; board[px[i]][py[i]] = 1; and get access violation on test #4; however, if I add right before accessing the array: if (px[i] < 0 || py [i] < 0 || px[i] > 2000 || py[i] > 2000) { while (1); } I get TLE on the same test. Are all the values of test #4 within the bounds -1000 <= x,y <= 1000 ?! Re: test #4 out of bounds? Statement is fixed. Now -2000 <= x,y <= 2000 (as it was actually in tests). Thank you. |
|
|