longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:29:34: error: no matching function for call to 'shuffle(std::vector<int>::iterator, std::vector<int>::iterator)'
29 | shuffle(p.begin(),p.end());
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from longesttrip.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3748:5: note: candidate: 'template<class _RAIter, class _UGenerator> void std::shuffle(_RAIter, _RAIter, _UGenerator&&)'
3748 | shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
| ^~~~~~~
/usr/include/c++/10/bits/stl_algo.h:3748:5: note: template argument deduction/substitution failed:
longesttrip.cpp:29:34: note: candidate expects 3 arguments, 2 provided
29 | shuffle(p.begin(),p.end());
| ^
longesttrip.cpp:49:20: error: redeclaration of 'std::vector<int> p'
49 | vector<int>p;
| ^
longesttrip.cpp:25:20: note: 'std::vector<int> p' previously declared here
25 | vector<int>p;
| ^
longesttrip.cpp:8:16: warning: control reaches end of non-void function [-Wreturn-type]
8 | vector<int>x,y;
| ^