longesttrip.cpp:10:1: error: 'vector' does not name a type
10 | vector<int> r;
| ^~~~~~
longesttrip.cpp: In function 'void bfs(int)':
longesttrip.cpp:16:5: error: 'queue' was not declared in this scope; did you mean 'std::queue'?
16 | queue<int> q;
| ^~~~~
| std::queue
In file included from /usr/include/c++/10/queue:64,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from longesttrip.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:96:11: note: 'std::queue' declared here
96 | class queue
| ^~~~~
longesttrip.cpp:16:11: error: expected primary-expression before 'int'
16 | queue<int> q;
| ^~~
longesttrip.cpp:22:5: error: 'q' was not declared in this scope
22 | q.push(nod);
| ^
longesttrip.cpp:44:5: error: 'vector' was not declared in this scope
44 | vector<int> aux;
| ^~~~~~
longesttrip.cpp:44:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
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 /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
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:44:12: error: expected primary-expression before 'int'
44 | vector<int> aux;
| ^~~
longesttrip.cpp:45:5: error: 'aux' was not declared in this scope
45 | aux.push_back(nod);
| ^~~
longesttrip.cpp:58:21: error: 'r' was not declared in this scope
58 | if(aux.size() > r.size())
| ^
longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:82:12: error: 'r' was not declared in this scope
82 | return r;
| ^