xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:5:9: error: 'vector' was not declared in this scope
5 | vector<int> a(n+1,0);
| ^~~~~~
xylophone.cpp:5:9: note: suggested alternatives:
In file included from /usr/include/c++/13/vector:66,
from /usr/include/c++/13/functional:64,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
from xylophone.cpp:1:
/usr/include/c++/13/bits/stl_vector.h:428:11: note: 'std::vector'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/13/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
xylophone.cpp:5:16: error: expected primary-expression before 'int'
5 | vector<int> a(n+1,0);
| ^~~
xylophone.cpp:6:9: error: 'a' was not declared in this scope
6 | a[1]=query(1,2);
| ^
xylophone.cpp:10:37: error: 'x' was not declared in this scope; did you mean 'x2'?
10 | a[i]=a[i-1]+a*((abs(x-x2)==abs(a[i-1]-a[i-2]))==a[i-1]>a[i-2]? 1:-1);
| ^
| x2