xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:5:9: error: 'vector' was not declared in this scope
5 | vector<int> res(N + 1);
| ^~~~~~
xylophone.cpp:5:9: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/11/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> res(N + 1);
| ^~~
xylophone.cpp:11:9: error: 'res' was not declared in this scope
11 | res[l] = 1;
| ^~~
xylophone.cpp:23:30: error: 'max' was not declared in this scope
23 | mx = max(mx, x);
| ^~~
xylophone.cpp:23:30: note: suggested alternatives:
In file included from /usr/include/c++/11/string:52,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from xylophone.cpp:1:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max'
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:3011:29: note: 'std::ranges::max'
3011 | inline constexpr __max_fn max{};
| ^~~
xylophone.cpp:40:30: error: 'max' was not declared in this scope
40 | mx = max(mx, x);
| ^~~
xylophone.cpp:40:30: note: suggested alternatives:
In file included from /usr/include/c++/11/string:52,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from xylophone.cpp:1:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max'
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:3011:29: note: 'std::ranges::max'
3011 | inline constexpr __max_fn max{};
| ^~~
xylophone.cpp:57:30: error: 'max' was not declared in this scope
57 | mx = max(mx, x);
| ^~~
xylophone.cpp:57:30: note: suggested alternatives:
In file included from /usr/include/c++/11/string:52,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from xylophone.cpp:1:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max'
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:3011:29: note: 'std::ranges::max'
3011 | inline constexpr __max_fn max{};
| ^~~