xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:22:8: error: 'query' was not declared in this scope
if(query(mid, n) < n - 1){
^~~~~
xylophone.cpp:31:8: error: 'query' was not declared in this scope
if(query(s, mid) < n - 1){
^~~~~
xylophone.cpp:40:19: error: 'query' was not declared in this scope
int res = n - query(t, i);
^~~~~
xylophone.cpp:47:19: error: 'query' was not declared in this scope
int res = 1 + query(i, s);
^~~~~
xylophone.cpp:54:19: error: 'query' was not declared in this scope
int res = 1 + query(s, i);
^~~~~
xylophone.cpp:61:5: error: 'answer' was not declared in this scope
answer(i, ans[i]);
^~~~~~
xylophone.cpp:61:5: note: suggested alternative: 'ans'
answer(i, ans[i]);
^~~~~~
ans