longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:38:27: warning: narrowing conversion of 'l1' from 'long long int' to 'int' [-Wnarrowing]
38 | if(are_connected({l1},{v[i]}))
| ^~
longesttrip.cpp:38:27: warning: narrowing conversion of 'l1' from 'long long int' to 'int' [-Wnarrowing]
longesttrip.cpp:38:37: warning: narrowing conversion of 'v.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
38 | if(are_connected({l1},{v[i]}))
| ^
longesttrip.cpp:38:37: warning: narrowing conversion of 'v.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:53:35: warning: narrowing conversion of 'l2' from 'long long int' to 'int' [-Wnarrowing]
53 | if(are_connected({l2},{v[i]}))
| ^~
longesttrip.cpp:53:35: warning: narrowing conversion of 'l2' from 'long long int' to 'int' [-Wnarrowing]
longesttrip.cpp:53:45: warning: narrowing conversion of 'v.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
53 | if(are_connected({l2},{v[i]}))
| ^
longesttrip.cpp:53:45: warning: narrowing conversion of 'v.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:90:45: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
90 | if(are_connected({p1[0]},{p2[0]}))
| ^
longesttrip.cpp:90:45: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:90:45: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:90:45: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:97:60: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
97 | else if(are_connected({p1[0]},{p2[p2.size()-1]}))
| ^
longesttrip.cpp:97:60: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:97:60: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[]((p2.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:97:60: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[]((p2.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:104:60: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[]((p1.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
104 | else if(are_connected({p1[p1.size()-1]},{p2[0]}))
| ^
longesttrip.cpp:104:60: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[]((p1.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:104:60: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:104:60: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[](0)' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:111:70: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[]((p1.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
111 | else if(are_connected({p1[p1.size()-1]},{p2[p2.size()-1]}))
| ^
longesttrip.cpp:111:70: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[]((p1.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:111:70: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[]((p2.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:111:70: warning: narrowing conversion of 'p2.std::vector<long long int>::operator[]((p2.std::vector<long long int>::size() - 1))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:136:40: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)r))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
136 | vector<int> v1 = {p1[r]};
| ^
longesttrip.cpp:136:40: warning: narrowing conversion of 'p1.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)r))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:151:44: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
151 | for(int j = f+1 ; p1.size()>j ; j++)
| ~~~~~~~~~^~
longesttrip.cpp:156:44: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
156 | for(int j = s+1 ; p2.size()>j ; j++)
| ~~~~~~~~~^~