longesttrip.cpp:3:1: error: 'mt19937_64' does not name a type
3 | mt19937_64 rng(0);
| ^~~~~~~~~~
longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:7:5: error: 'vector' was not declared in this scope
7 | vector<int>x,y;
| ^~~~~~
longesttrip.cpp:7:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from longesttrip.h:1,
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.h:1,
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:12: error: expected primary-expression before 'int'
7 | vector<int>x,y;
| ^~~
longesttrip.cpp:8:5: error: 'x' was not declared in this scope
8 | x.push_back(0);
| ^
longesttrip.cpp:13:13: error: 'y' was not declared in this scope
13 | y.push_back(i);
| ^
longesttrip.cpp:16:8: error: 'y' was not declared in this scope
16 | if(y.size()>0 && !are_connected(x,y)){
| ^
longesttrip.cpp:23:8: error: 'y' was not declared in this scope
23 | if(y.empty()){
| ^
longesttrip.cpp:24:16: error: expected primary-expression before 'int'
24 | vector<int>p;
| ^~~
longesttrip.cpp:26:13: error: 'p' was not declared in this scope
26 | p.push_back(i);
| ^
longesttrip.cpp:28:17: error: 'p' was not declared in this scope
28 | shuffle(p.begin(),p.end());
| ^
longesttrip.cpp:28:9: error: 'shuffle' was not declared in this scope
28 | shuffle(p.begin(),p.end());
| ^~~~~~~
longesttrip.cpp:29:16: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
29 | vector<pair<int,int>>X;
| ^~~~
| std::pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from longesttrip.h:1,
from longesttrip.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
longesttrip.cpp:29:21: error: expected primary-expression before 'int'
29 | vector<pair<int,int>>X;
| ^~~
longesttrip.cpp:30:16: error: expected primary-expression before 'int'
30 | vector<int>Y;
| ^~~
longesttrip.cpp:36:44: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
36 | if(are_connected({x}, {*it})){
| ^
| |
| <brace-enclosed initializer list>
longesttrip.cpp:37:21: error: 'X' was not declared in this scope
37 | X.push_back({x,*it});
| ^
longesttrip.cpp:44:17: error: 'Y' was not declared in this scope
44 | Y.push_back(x);
| ^
longesttrip.cpp:47:16: error: expected primary-expression before 'int'
47 | vector<int>ans;
| ^~~
longesttrip.cpp:48:16: error: expected primary-expression before 'int'
48 | vector<int>p;
| ^~~
longesttrip.cpp:49:9: error: 'ans' was not declared in this scope
49 | ans.push_back({1});
| ^~~
longesttrip.cpp:54:39: error: 'rng' was not declared in this scope
54 | shuffle(p.begin(),p.end(),rng);
| ^~~
longesttrip.cpp:57:51: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
57 | if(are_connected({ans.back()}, {i})){
| ^
| |
| <brace-enclosed initializer list>
longesttrip.cpp:59:29: error: 'find' was not declared in this scope
59 | p.erase(find(p.begin(),p.end(), i));
| ^~~~