cave.cpp: In function 'int go(int, int)':
cave.cpp:5:26: error: 'n' was not declared in this scope
for(int i=0;i<n;i++) {
^
cave.cpp:6:26: error: 'B' was not declared in this scope
if(B[i]>0) A[i]=B[i]-1;
^
cave.cpp:6:34: error: 'A' was not declared in this scope
if(B[i]>0) A[i]=B[i]-1;
^
cave.cpp:7:47: error: 'A' was not declared in this scope
else { if(x<=i && i<=y) A[i]=1;
^
cave.cpp:8:39: error: 'A' was not declared in this scope
else A[i]=0;
^
cave.cpp:11:34: error: 'A' was not declared in this scope
return tryCombination(A);
^
cave.cpp: In function 'int go1(int, int)':
cave.cpp:14:26: error: 'n' was not declared in this scope
for(int i=0;i<n;i++) {
^
cave.cpp:15:26: error: 'B' was not declared in this scope
if(B[i]>0) A[i]=B[i]-1;
^
cave.cpp:15:34: error: 'A' was not declared in this scope
if(B[i]>0) A[i]=B[i]-1;
^
cave.cpp:16:45: error: 'A' was not declared in this scope
else { if(x>i || i>y) A[i]=0;
^
cave.cpp:17:39: error: 'A' was not declared in this scope
else A[i]=1;
^
cave.cpp:20:34: error: 'A' was not declared in this scope
return tryCombination(A);
^
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:45:25: error: 'mid' was not declared in this scope
C[mid]=i;
^~~
cave.cpp:23:16: warning: unused variable 'A' [-Wunused-variable]
int A[200005],B[200005],C[200005],D[200005];
^