cave.cpp: In function 'void flip(int, int)':
cave.cpp:17:20: warning: array subscript 5005 is above array bounds of 'bool [5005]' [-Warray-bounds]
17 | if(!vis[mxn])S[i] ^= 1;
| ~~~~~~~^
cave.cpp:10:6: note: while referencing 'vis'
10 | bool vis[mxn];
| ^~~
cave.cpp: In function 'int find(int)':
cave.cpp:17:20: warning: array subscript 5005 is above array bounds of 'bool [5005]' [-Warray-bounds]
17 | if(!vis[mxn])S[i] ^= 1;
| ~~~~~~~^
cave.cpp:10:6: note: while referencing 'vis'
10 | bool vis[mxn];
| ^~~
cave.cpp:17:20: warning: array subscript 5005 is above array bounds of 'bool [5005]' [-Warray-bounds]
17 | if(!vis[mxn])S[i] ^= 1;
| ~~~~~~~^
cave.cpp:10:6: note: while referencing 'vis'
10 | bool vis[mxn];
| ^~~
cave.cpp:17:20: warning: array subscript 5005 is above array bounds of 'bool [5005]' [-Warray-bounds]
17 | if(!vis[mxn])S[i] ^= 1;
| ~~~~~~~^
cave.cpp:10:6: note: while referencing 'vis'
10 | bool vis[mxn];
| ^~~