game.cpp: In function 'int<unnamed struct>::update(int, int, int, int, int)':
game.cpp:46:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
46 | 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:46:32: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
46 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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:69:40: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
69 | 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};
| ^~