xylophone.cpp:3:28: error: 'vector' has not been declared
int my_query(int l, int r, vector <int> &a) {
^~~~~~
xylophone.cpp:3:35: error: expected ',' or '...' before '<' token
int my_query(int l, int r, vector <int> &a) {
^
xylophone.cpp: In function 'int my_query(int, int, int)':
xylophone.cpp:6:22: error: 'a' was not declared in this scope
mx = max(mx, a[i]);
^
xylophone.cpp:6:14: error: 'max' was not declared in this scope
mx = max(mx, a[i]);
^~~
xylophone.cpp:6:14: note: suggested alternative: 'mx'
mx = max(mx, a[i]);
^~~
mx
xylophone.cpp:7:14: error: 'min' was not declared in this scope
mn = min(mn, a[i]);
^~~
xylophone.cpp:7:14: note: suggested alternative: 'mn'
mn = min(mn, a[i]);
^~~
mn
xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:16:5: error: 'vector' was not declared in this scope
vector <int> a(n + 1, -1);
^~~~~~
xylophone.cpp:16:13: error: expected primary-expression before 'int'
vector <int> a(n + 1, -1);
^~~
xylophone.cpp:17:5: error: 'a' was not declared in this scope
a[r] = n;
^
xylophone.cpp:33:9: error: 'assert' was not declared in this scope
assert(a[i] != -1);
^~~~~~
xylophone.cpp:33:9: note: suggested alternative: 'answer'
assert(a[i] != -1);
^~~~~~
answer
xylophone.cpp:44:9: error: 'assert' was not declared in this scope
assert(a[i] != -1);
^~~~~~
xylophone.cpp:44:9: note: suggested alternative: 'answer'
assert(a[i] != -1);
^~~~~~
answer