xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:11:39: error: 'query' was not declared in this scope
for(int i=1; i<N; ++i) dif[i - 1] = query(i, i + 1);
^~~~~
xylophone.cpp:15:8: error: 'query' was not declared in this scope
if(query(i, i + 2) != (dif[i - 1] + dif[i])) sign = -sign;
^~~~~
xylophone.cpp:27:26: error: 'answer' was not declared in this scope
for(int i=0; i<N; ++i) answer(i + 1, A[i] - A[mn] + 1);
^~~~~~
xylophone.cpp:27:26: note: suggested alternative: 'assert'
for(int i=0; i<N; ++i) answer(i + 1, A[i] - A[mn] + 1);
^~~~~~
assert