longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:79:18: warning: comparison of integer expressions of different signedness: 'std::deque<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
79 | while(a.size() < n){
| ~~~~~~~~~^~~
longesttrip.cpp:91:13: error: 'ul' was not declared in this scope; did you mean 'ub'?
91 | while(ul <= ur){
| ^~
| ub
longesttrip.cpp:91:19: error: 'ur' was not declared in this scope; did you mean 'ub'?
91 | while(ul <= ur){
| ^~
| ub
longesttrip.cpp:95:29: error: could not convert 'a' from 'std::deque<int>' to 'std::vector<int>'
95 | if(are_connected(z, a)){
| ^
| |
| std::deque<int>
longesttrip.cpp:100:27: error: could not convert 'a' from 'std::deque<int>' to 'std::vector<int>'
100 | if(ub == -1) return a;
| ^
| |
| std::deque<int>
longesttrip.cpp:103:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
103 | int um = ul+ur>>1;
| ~~^~~
longesttrip.cpp:107:19: error: 'x' was not declared in this scope
107 | ua = um;x
| ^
longesttrip.cpp:90:11: warning: unused variable 'vl' [-Wunused-variable]
90 | int vl = 0, vr = int(b.size()) - 1, ub = -1; vi aa(all(a));
| ^~
longesttrip.cpp:90:19: warning: unused variable 'vr' [-Wunused-variable]
90 | int vl = 0, vr = int(b.size()) - 1, ub = -1; vi aa(all(a));
| ^~
longesttrip.cpp:77:15: warning: unused variable 'v' [-Wunused-variable]
77 | int u = -1, v;
| ^