koala.cpp: In function 'bool cmp(const int&, const int&)':
koala.cpp:2:24: error: 'n' was not declared in this scope
2 | for(int i = 0; i < n; i++) b[i] = 0;
| ^
koala.cpp:2:32: error: 'b' was not declared in this scope
2 | for(int i = 0; i < n; i++) b[i] = 0;
| ^
koala.cpp:3:5: error: 'b' was not declared in this scope
3 | b[x] = w / 2; b[y] = w / 2;
| ^
koala.cpp:3:12: error: 'w' was not declared in this scope
3 | b[x] = w / 2; b[y] = w / 2;
| ^
koala.cpp:4:18: error: 'c' was not declared in this scope
4 | playRound(b, c);
| ^
koala.cpp:4:5: error: 'playRound' was not declared in this scope
4 | playRound(b, c);
| ^~~~~~~~~
koala.cpp: In function 'void allValues(int, int, int*)':
koala.cpp:9:5: error: 'n' was not declared in this scope; did you mean '_n'?
9 | n = _n;
| ^
| _n
koala.cpp:10:5: error: 'w' was not declared in this scope
10 | w = W;
| ^
koala.cpp:12:36: error: 'order' was not declared in this scope
12 | for(int i = 0; i < n; i++) order[i] = i;
| ^~~~~
koala.cpp:13:14: error: 'order' was not declared in this scope
13 | sort(order, order + n, cmp);
| ^~~~~
koala.cpp:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(order, order + n, cmp);
| ^~~~
| short
koala.cpp:16:9: error: 'vector' was not declared in this scope
16 | vector<int> init;
| ^~~~~~
koala.cpp:16:16: error: expected primary-expression before 'int'
16 | vector<int> init;
| ^~~
koala.cpp:17:36: error: 'init' was not declared in this scope; did you mean 'int'?
17 | for(int i = 0; i < n; i++) init.push_back(i);
| ^~~~
| int
koala.cpp:18:15: error: 'init' was not declared in this scope; did you mean 'int'?
18 | solve(init, 1, n);
| ^~~~
| int
koala.cpp:18:9: error: 'solve' was not declared in this scope
18 | solve(init, 1, n);
| ^~~~~
koala.cpp:19:43: error: 'ans' was not declared in this scope
19 | for(int i = 0; i < n; i++) P[i] = ans[i];
| ^~~