longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:40:24: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
40 | if (ans.size() == N) return ans;
| ~~~~~~~~~~~^~~~
longesttrip.cpp:53:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | for (int i = 0; i < ans2.size(); i++) {
| ~~^~~~~~~~~~~~~
longesttrip.cpp:59:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
59 | for (int j = 0; j < ans2.size(); j++) if (j != i) ANS.push_back(ans2[j]);
| ~~^~~~~~~~~~~~~
longesttrip.cpp:66:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
66 | for (int i = 1; i < ans.size()-1; i++) {
| ~~^~~~~~~~~~~~~~
longesttrip.cpp:67:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
67 | for (int j = 0; j < ans2.size(); j++) {
| ~~^~~~~~~~~~~~~
longesttrip.cpp:73:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
73 | for (int k = 0; k < ans2.size(); k++) if (k != j) ANS.push_back(ans2[k]);
| ~~^~~~~~~~~~~~~
longesttrip.cpp:75:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
75 | for (int k = i; k < ans.size(); k++) ANS.push_back(ans[k]);
| ~~^~~~~~~~~~~~