Problem GSS
User carson
Submission Time 2025-08-08 16:00:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

GSS.cpp: In function ‘int main()’:
GSS.cpp:11:23: error: no matching function for call to ‘reverse(std::vector<int>&, std::vector<int>::iterator)’
11 | reverse(arr,arr.end());
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from GSS.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:1186:5: note: candidate: ‘template<class _BIter> void std::reverse(_BIter, _BIter)’
1186 | reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
| ^~~~~~~
/usr/include/c++/9/bits/stl_algo.h:1186:5: note: template argument deduction/substitution failed:
GSS.cpp:11:23: note: deduced conflicting types for parameter ‘_BIter’ (‘std::vector<int>’ and ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’)
11 | reverse(arr,arr.end());
| ^
In fil