koala.cpp: In function 'bool compare(int, int, int, int)':
koala.cpp:2:14: error: 'B' was not declared in this scope
2 | fill(B, B + N, 0);
| ^
koala.cpp:2:9: error: 'fill' was not declared in this scope
2 | fill(B, B + N, 0);
| ^~~~
koala.cpp:4:22: error: 'R' was not declared in this scope
4 | playRound(B, R);
| ^
koala.cpp:4:9: error: 'playRound' was not declared in this scope
4 | playRound(B, R);
| ^~~~~~~~~
koala.cpp: At global scope:
koala.cpp:7:1: error: 'vector' does not name a type
7 | vector<int> mergesort(vector<int> v, int N, int W) {
| ^~~~~~
koala.cpp: In function 'void allValues(int, int, int*)':
koala.cpp:29:17: error: 'vector' was not declared in this scope
29 | vector<int> v;
| ^~~~~~
koala.cpp:29:24: error: expected primary-expression before 'int'
29 | vector<int> v;
| ^~~
koala.cpp:30:45: error: 'v' was not declared in this scope
30 | for (int i = 0; i < N; i++) v.push_back(i);
| ^
koala.cpp:31:24: error: expected primary-expression before 'int'
31 | vector<int> sorted = mergesort(v, N, W / 2);
| ^~~
koala.cpp:32:47: error: 'sorted' was not declared in this scope
32 | for (int i = 0; i < N; i++) P[sorted[i]] = i + 1;
| ^~~~~~