longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:55:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for (int i = 0; i <= path.size(); i++)
| ~~^~~~~~~~~~~~~~
longesttrip.cpp:82:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | int end_op = best_end == path.size() ? unconnected.back() : find_opposite(unconnected, path[best_end]);
| ~~~~~~~~~^~~~~~~~~~~~~~
longesttrip.cpp:81:9: warning: unused variable 'start_op' [-Wunused-variable]
81 | int start_op = best_start == -1 ? unconnected.front() : find_opposite(unconnected, path[best_start]);
| ^~~~~~~~
longesttrip.cpp:82:9: warning: unused variable 'end_op' [-Wunused-variable]
82 | int end_op = best_end == path.size() ? unconnected.back() : find_opposite(unconnected, path[best_end]);
| ^~~~~~
longesttrip.cpp: In function 'int find_opposite(std::vector<int>, int)':
longesttrip.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
14 | }
| ^
longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:21:22: warning: control reaches end of non-void function [-Wreturn-type]
21 | std::vector<int> unconnected;
| ^~~~~~~~~~~