xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:16:43: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
16 | if(temp2 != temp1 + a[i - 2] - a[i - 1] && a[i-2] > a[i-1] || temp2 == temp1 + a[i - 1] - a[i - 2] && a[i-2] < a[i-1]) a[i] = a[i - 1] + temp1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
xylophone.cpp:27:45: warning: 'pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
27 | for(int i = 1; i <= n; ++i) answer(i, a[i] - pos + 1);
| ~~~~~^~~~~