longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:23:17: warning: variable 'r' set but not used [-Wunused-but-set-variable]
23 | int l=0,r=0;
| ^
longesttrip.cpp:73:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
73 | for(int i=0;i<v1.size()/2;i++){
| ~^~~~~~~~~~~~
longesttrip.cpp:76:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int i=v1.size()/2;i<v1.size();i++){
| ~^~~~~~~~~~
longesttrip.cpp:88:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
88 | for(int i=0;i<u1.size()/2;i++){
| ~^~~~~~~~~~~~
longesttrip.cpp:91:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
91 | for(int i=u1.size()/2;i<u1.size();i++){
| ~^~~~~~~~~~
longesttrip.cpp:101:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
101 | for(int i=0;i<v.size();i++){
| ~^~~~~~~~~
longesttrip.cpp:107:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
107 | for(int i=0;i<u.size();i++){
| ~^~~~~~~~~
longesttrip.cpp:34:13: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
34 | if(i!=x){
| ^~