cave.cpp:13:7: error: 'n' was not declared in this scope; did you mean 'yn'?
13 | int s[n], d[n];
| ^
| yn
cave.cpp:13:13: error: 'n' was not declared in this scope; did you mean 'yn'?
13 | int s[n], d[n];
| ^
| yn
cave.cpp: In function 'void solve(int, int, int, bool)':
cave.cpp:17:9: error: 's' was not declared in this scope
17 | s[x]=0;
| ^
cave.cpp:21:9: error: 'd' was not declared in this scope
21 | d[x]=l;
| ^
cave.cpp:26:12: error: 'd' was not declared in this scope
26 | if(d[i]==-1){
| ^
cave.cpp:27:13: error: 's' was not declared in this scope
27 | s[i]=1-s[i];
| ^
cave.cpp:30:29: error: 's' was not declared in this scope
30 | int tc = tryCombination(s);
| ^
cave.cpp:34:28: error: expected ';' before '}' token
34 | solve(l, mid, x, 1)
| ^
| ;
35 | }else if (tc!=x&&b==0){
| ~
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:45:9: error: 'd' was not declared in this scope
45 | d[i]=-1;
| ^
cave.cpp:46:9: error: 's' was not declared in this scope
46 | s[n]=0;
| ^
cave.cpp:51:33: error: 's' was not declared in this scope
51 | int tc = tryCombination(s);
| ^
cave.cpp:58:12: error: 's' was not declared in this scope
58 | answer(s, d);
| ^
cave.cpp:58:15: error: 'd' was not declared in this scope
58 | answer(s, d);
| ^