prize.cpp:5:1: error: 'P' does not name a type
5 | P save[200005];
| ^
prize.cpp:8:1: error: 'P' does not name a type
8 | P query(int i) {
| ^
prize.cpp:18:23: error: expected ',' or '...' before '.' token
18 | void solve(int l,int r.int k,int y) {
| ^
prize.cpp: In function 'void solve(int, int)':
prize.cpp:23:5: error: 'P' was not declared in this scope
23 | P got=query(mid);
| ^
prize.cpp:24:9: error: 'got' was not declared in this scope
24 | if (got.first+got.second==n-1) {
| ^~~
prize.cpp:25:23: error: 'y' was not declared in this scope
25 | solve(l,mid-1,y-got.second,y);
| ^
prize.cpp:26:23: error: 'k' was not declared in this scope
26 | solve(mid+1,r,k-(y-got.second),got.second);
| ^
prize.cpp:32:10: error: expected ';' before 'got'
32 | P got=query(i);
| ^~~~
| ;
prize.cpp:33:13: error: 'got' was not declared in this scope
33 | if (got.first+got.second==n-1) {
| ^~~
prize.cpp:34:25: error: 'y' was not declared in this scope
34 | solve(l,i-1,y-got.second,y);
| ^
prize.cpp:35:27: error: 'k' was not declared in this scope
35 | solve(mid+1,r,k-(y-got.second)-cnt,got.second-cnt);
| ^
prize.cpp:39:19: error: 'k' was not declared in this scope
39 | solve(mid+1,r,k-cnt,y-cnt);
| ^
prize.cpp:39:25: error: 'y' was not declared in this scope
39 | solve(mid+1,r,k-cnt,y-cnt);
| ^
prize.cpp: In function 'int find_best(int)':
prize.cpp:45:6: error: 'save' was not declared in this scope
45 | save[i]=P(-1,-1);
| ^~~~
prize.cpp:45:14: error: 'P' was not declared in this scope
45 | save[i]=P(-1,-1);
| ^
prize.cpp:49:10: error: 'query' was not declared in this scope
49 | if (query(x)==P(0,0)) {
| ^~~~~
prize.cpp:49:20: error: 'P' was not declared in this scope
49 | if (query(x)==P(0,0)) {
| ^