Problem rotate
User Shadow1
Submission Time 2025-05-20 22:13:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rotate.cpp: In function ‘void energy(long long int, std::vector<long long int>)’:
rotate.cpp:36:67: error: no matching function for call to ‘rotate(<brace-enclosed initializer list>, long long int)’
36 | rotate({a[i+(n+1)/2].sec}, 25000-a[i+(n+1)/2].fir+a[i].fir);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rotate.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:1440:5: note: candidate: ‘template<class _FIter> _FIter std::_V2::rotate(_FIter, _FIter, _FIter)’
1440 | rotate(_ForwardIterator __first, _ForwardIterator __middle,
| ^~~~~~
/usr/include/c++/9/bits/stl_algo.h:1440:5: note: template argument deduction/substitution failed:
rotate.cpp:36:67: note: candidate expects 3 arguments, 2 provided
36 | rotate({a[i+(n+1)/2