game.cpp: In function 'int<unnamed struct>::update(int, int, int, int, int)':
game.cpp:50:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
50 | tree[node].ch[4]=update(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp:50:32: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
50 | tree[node].ch[4]=update(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~~~~~~~~~~~^
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp: In function 'void<unnamed struct>::query(int, int, int, int, int)':
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~
game.cpp: In function 'long long int calculate(int, int, int, int)':
game.cpp:74:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
74 | if(mid1+1<=r1&&mid2+1<=r2)query(mid1+1,r1,mid2+1,r2,tree[node].ch[4]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
game.cpp:19:13: note: while referencing '<unnamed struct>::Node::ch'
19 | int ch[4]{0,0,0,0};
| ^~