Main.cpp: In function 'void solve()':
Main.cpp:29:26: error: 'i' was not declared in this scope
29 | while(pos.size() and i<n)
| ^
Main.cpp:31:12: error: 'lb' was not declared in this scope; did you mean 'b'?
31 | if(lb!=pos.begin()){
| ^~
| b
Main.cpp:33:34: error: 'i' was not declared in this scope
33 | int tmp=min(a[*lb],b[i]);
| ^
Main.cpp:43:13: error: 'i' was not declared in this scope
43 | i++;
| ^
Main.cpp: At global scope:
Main.cpp:45:5: error: expected unqualified-id before 'for'
45 | for(int i=0;i<n;i++)
| ^~~
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:19: error: 'n' was not declared in this scope; did you mean 'yn'?
45 | for(int i=0;i<n;i++)
| ^
| yn
Main.cpp:45:17: error: 'i' does not name a type; did you mean 'fi'?
45 | for(int i=0;i<n;i++)
| ^
| fi
Main.cpp:45:21: error: 'i' does not name a type; did you mean 'fi'?
45 | for(int i=0;i<n;i++)
| ^
| fi
Main.cpp:48:9: error: expected unqualified-id before 'else'
48 | else
| ^~~~
Main.cpp:50:5: error: 'cout' does not name a type
50 | cout<<ans<<endl;
| ^~~~
Main.cpp:51:1: error: expected declaration before '}' token
51 | }
| ^