longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:7:3: error: 'vector' was not declared in this scope
7 | vector<int> ans;
| ^~~~~~
longesttrip.cpp:7:3: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from longesttrip.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from longesttrip.cpp:1:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
longesttrip.cpp:7:10: error: expected primary-expression before 'int'
7 | vector<int> ans;
| ^~~
longesttrip.cpp:9:4: error: 'ans' was not declared in this scope
9 | ans.push_back(i);
| ^~~
longesttrip.cpp:10:10: error: 'ans' was not declared in this scope
10 | return ans;
| ^~~