xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:8:11: error: 'query' was not declared in this scope
8 | while(query(i, n) == n - 1){
| ^~~~~
xylophone.cpp:14:13: error: 'query' was not declared in this scope
14 | int x = query(i, i + 1) + 1;
| ^~~~~
xylophone.cpp:19:10: warning: statement has no effect [-Wunused-value]
19 | for (i; i <= n; i++){
| ^
xylophone.cpp:21:13: warning: unused variable 'mx' [-Wunused-variable]
21 | int mx = max(a[i - 1], a[i - 2]);
| ^~
xylophone.cpp:41:10: warning: statement has no effect [-Wunused-value]
41 | for (i; i >= 1; i--){
| ^
xylophone.cpp:43:13: warning: unused variable 'mx' [-Wunused-variable]
43 | int mx = max(a[i + 1], a[i + 2]);
| ^~
xylophone.cpp:58:34: error: 'answer' was not declared in this scope
58 | for (int i = 1; i <= n; i++) answer(i, a[i]);
| ^~~~~~
xylophone.cpp:6:9: warning: unused variable 'pos' [-Wunused-variable]
6 | int pos = 0;
| ^~~