xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:18:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
18 | if(tmp < ans[i-1] && ans[i-2] > ans[i-1] || tmp > ans[i-1] && ans[i-2] < ans[i-1]) ans[i] = ans[i-1]+a[i-1];
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
xylophone.cpp:23:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
23 | if(tmp < ans[i+1] && ans[i+2] > ans[i+1] || tmp > ans[i+1] && ans[i+2] < ans[i+1]) ans[i] = ans[i+1]+a[i+1];
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
xylophone.cpp: At global scope:
xylophone.cpp:3:12: warning: 'A' defined but not used [-Wunused-variable]
3 | static int A[5000];
| ^