Problem smurf
User Nikelodean
Submission Time 2026-02-07 11:33:52
Score 0
Max Time N/A
Max Memory N/A

Compile Error

smurf.cpp: In function ‘int main()’:
smurf.cpp:12:7: error: ‘class std::vector<long long int>’ has no member named ‘pushback’; did you mean ‘push_back’?
12 | ans.pushback(arr[i]);
| ^~~~~~~~
| push_back
smurf.cpp:13:14: error: no matching function for call to ‘reverse(std::vector<long long int>&)’
13 | reverse(ans);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from smurf.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:
smurf.cpp:13:14: note: candidate expects 2 arguments, 1 provided
1