foo.cc: In function 'long long int time_old(int)':
foo.cc:73:51: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
73 | remain_blocks -= position[index][3];
| ~~~~~~~~~~~~~~~~~^
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:52:38: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
52 | position[index - 1][3] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:53:34: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
53 | position[index][2] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:54:34: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
54 | position[index][3] = position[index + 1][0] - position[index][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:55:38: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
55 | position[index + 1][2] = position[index + 1][0] - position[index][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'void update(int)' at foo.cc:44:15,
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:49:38: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
49 | position[index - 1][3] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'void update(int)' at foo.cc:44:15,
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:50:34: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
50 | position[index][2] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:46:30: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
46 | position[0][3] = position[1][0] - position[0][0] - 1;
| ~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:79:11:
foo.cc:47:30: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
47 | position[1][2] = position[1][0] - position[0][0] - 1;
| ~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'void update(int)' at foo.cc:44:15,
inlined from 'long long int time_old(int)' at foo.cc:75:10:
foo.cc:49:38: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
49 | position[index - 1][3] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'void update(int)' at foo.cc:44:15,
inlined from 'long long int time_old(int)' at foo.cc:75:10:
foo.cc:50:34: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
50 | position[index][2] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:75:10:
foo.cc:46:30: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
46 | position[0][3] = position[1][0] - position[0][0] - 1;
| ~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:75:10:
foo.cc:47:30: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
47 | position[1][2] = position[1][0] - position[0][0] - 1;
| ~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
foo.cc:63:51: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
63 | remain_blocks -= position[index][2];
| ~~~~~~~~~~~~~~~~~^
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:69:11:
foo.cc:52:38: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
52 | position[index - 1][3] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:69:11:
foo.cc:53:34: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
53 | position[index][2] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:69:11:
foo.cc:54:34: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
54 | position[index][3] = position[index + 1][0] - position[index][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:69:11:
foo.cc:55:38: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
55 | position[index + 1][2] = position[index + 1][0] - position[index][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'void update(int)' at foo.cc:44:15,
inlined from 'long long int time_old(int)' at foo.cc:69:11:
foo.cc:49:38: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
49 | position[index - 1][3] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'void update(int)' at foo.cc:44:15,
inlined from 'long long int time_old(int)' at foo.cc:69:11:
foo.cc:50:34: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
50 | position[index][2] = position[index][0] - position[index - 1][0] - 1;
| ~~~~~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:65:10:
foo.cc:46:30: warning: array subscript 3 is above array bounds of 'int [2]' [-Warray-bounds=]
46 | position[0][3] = position[1][0] - position[0][0] - 1;
| ~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~
In function 'void update(int)',
inlined from 'long long int time_old(int)' at foo.cc:65:10:
foo.cc:47:30: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds=]
47 | position[1][2] = position[1][0] - position[0][0] - 1;
| ~~~~~~~~~~~~~^
foo.cc: In function 'long long int time_old(int)':
foo.cc:17:14: note: while referencing 'position'
17 | int c, T, n, position[MAXN][2], order[MAXN], now_index, remain_blocks, LoR;
| ^~~~~~~~