In file included from /usr/include/c++/10/random:49,
from longesttrip.cpp:2:
/usr/include/c++/10/bits/random.h: In instantiation of 'class std::uniform_real_distribution<int>':
longesttrip.cpp:65:34: required from here
/usr/include/c++/10/bits/random.h:1733:56: error: static assertion failed: result_type must be a floating point type
1733 | static_assert(std::is_floating_point<_RealType>::value,
| ^~~~~
longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:67:8: error: 'gen' was not declared in this scope
67 | a=R(gen());
| ^~~
longesttrip.cpp:74:22: warning: narrowing conversion of 'a' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
74 | if(are_connected({a},{i}))S.back().push_back(i);
| ^
longesttrip.cpp:74:22: warning: narrowing conversion of 'a' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:88:29: warning: narrowing conversion of 'A.std::vector<long long int>::back()' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
88 | if(are_connected({A.back()},{T[0]})){
| ~~~~~~^~
longesttrip.cpp:88:29: warning: narrowing conversion of 'A.std::vector<long long int>::back()' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:88:39: warning: narrowing conversion of 'T.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]
88 | if(are_connected({A.back()},{T[0]})){
| ^
longesttrip.cpp:88:39: warning: narrowing conversion of 'T.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:91:34: warning: narrowing conversion of 'B.std::vector<long long int>::back()' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
91 | else if(are_connected({B.back()},{T[0]})){
| ~~~~~~^~
longesttrip.cpp:91:34: warning: narrowing conversion of 'B.std::vector<long long int>::back()' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:91:44: warning: narrowing conversion of 'T.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]
91 | else if(are_connected({B.back()},{T[0]})){
| ^
longesttrip.cpp:91:44: warning: narrowing conversion of 'T.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:101:11: error: could not convert 'A' from 'vector<long long int>' to 'vector<int>'
101 | return A;
| ^
| |
| vector<long long int>
longesttrip.cpp:102:28: warning: narrowing conversion of 'A.std::vector<long long int>::back()' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
102 | if(are_connected({A.back()},{B[0]})){
| ~~~~~~^~
longesttrip.cpp:102:28: warning: narrowing conversion of 'A.std::vector<long long int>::back()' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
longesttrip.cpp:102:38: warning: narrowing conversion of 'B.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]
102 | if(are_connected({A.back()},{B[0]})){
| ^
longesttrip.cpp:102:38: warning: narrowing conversion of 'B.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:105:39: warning: narrowing conversion of 'A.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]
105 | else if(are_connected({A[0]},{B[0]})){
| ^
longesttrip.cpp:105:39: warning: narrowing conversion of 'A.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:105:39: warning: narrowing conversion of 'B.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:105:39: warning: narrowing conversion of 'B.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:110:22: error: could not convert 'A' from 'vector<long long int>' to 'vector<int>'
110 | if(are_connected(A,B)){
| ^
| |
| vector<long long int>
longesttrip.cpp:116:24: error: could not convert 'A' from 'vector<long long int>' to 'vector<int>'
116 | if(are_connected(A,tmp)){
| ^
| |
| vector<long long int>
longesttrip.cpp:117:15: error: 'rr' was not declared in this scope; did you mean 'r'?
117 | bb=min(rr,mid);
| ^~
| r
longesttrip.cpp:128:24: error: could not convert 'B' from 'vector<long long int>' to 'vector<int>'
128 | if(are_connected(B,tmp)){
| ^
| |
| vector<long long int>
longesttrip.cpp:129:15: error: 'rr' was not declared in this scope; did you mean 'r'?
129 | bb=min(rr,mid);
| ^~
| r
longesttrip.cpp:139:8: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'std::vector<long long int>')
139 | ret=A;
| ^
In file included from /usr/include/c++/10/vector:72,
from longesttrip.h:1,
from longesttrip.cpp:1:
/usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'const std::vector<int>&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/vector:67,
from longesttrip.h:1,
from longesttrip.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::vector<int>&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'std::vector<long long int>' to 'std::initializer_list<int>'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~