obstacles.cpp:3:12: error: 'vector' does not name a type
3 | #define vi vector<int>
| ^~~~~~
obstacles.cpp:6:1: note: in expansion of macro 'vi'
6 | vi res;
| ^~
obstacles.cpp:8:6: error: variable or field 'initialize' declared void
8 | void initialize(vi T, vi H){
| ^~~~~~~~~~
obstacles.cpp:3:12: error: 'vector' was not declared in this scope
3 | #define vi vector<int>
| ^~~~~~
obstacles.cpp:8:17: note: in expansion of macro 'vi'
8 | void initialize(vi T, vi H){
| ^~
obstacles.cpp:3:12: note: suggested alternatives:
3 | #define vi vector<int>
| ^~~~~~
obstacles.cpp:8:17: note: in expansion of macro 'vi'
8 | void initialize(vi T, vi H){
| ^~
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 obstacles.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 obstacles.cpp:1:
/usr/include/c++/11/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
obstacles.cpp:3:19: error: expected primary-expression before 'int'
3 | #define vi vector<int>
| ^~~
obstacles.cpp:8:17: note: in expansion of macro 'vi'
8 | void initialize(vi T, vi H){
| ^~
obstacles.cpp:3:12: error: 'vector' was not declared in this scope
3 | #define vi vector<int>
| ^~~~~~
obstacles.cpp:8:23: note: in expansion of macro 'vi'
8 | void initialize(vi T, vi H){
| ^~
obstacles.cpp:3:12: note: suggested alternatives:
3 | #define vi vector<int>
| ^~~~~~
obstacles.cpp:8:23: note: in expansion of macro 'vi'
8 | void initialize(vi T, vi H){
| ^~
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 obstacles.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 obstacles.cpp:1:
/usr/include/c++/11/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
obstacles.cpp:3:19: error: expected primary-expression before 'int'
3 | #define vi vector<int>
| ^~~
obstacles.cpp:8:23: note: in expansion of macro 'vi'
8 | void initialize(vi T, vi H){
| ^~
obstacles.cpp: In function 'bool can_reach(int, int, int, int)':
obstacles.cpp:30:27: error: 'res' was not declared in this scope
30 | auto i1 = lower_bound(res.begin(), res.end(), S);
| ^~~
obstacles.cpp:30:15: error: 'lower_bound' was not declared in this scope
30 | auto i1 = lower_bound(res.begin(), res.end(), S);
| ^~~~~~~~~~~
obstacles.cpp:30:15: 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 obstacles.cpp:1:
/usr/include/c++/11/bits/stl_algo.h:2011:5: note: 'std::lower_bound'
2011 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from obstacles.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:2124:37: note: 'std::ranges::lower_bound'
2124 | inline constexpr __lower_bound_fn lower_bound{};
| ^~~~~~~~~~~
obstacles.cpp:31:15: error: 'upper_bound' was not declared in this scope
31 | auto i2 = upper_bound(res.begin(), res.end(), D);
| ^~~~~~~~~~~
obstacles.cpp:31:15: 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 obstacles.cpp:1:
/usr/include/c++/11/bits/stl_algo.h:2098:5: note: 'std::upper_bound'
2098 | upper_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:64,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from obstacles.cpp:1:
/usr/include/c++/11/bits/ranges_algo.h:2168:37: note: 'std::ranges::upper_bound'
2168 | inline constexpr __upper_bound_fn upper_bound{};
| ^~~~~~~~~~~