Problem rotate
User jatro13
Submission Time 2026-03-19 18:10:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rotate.cpp: In function ‘void energy(int, std::vector<int>)’:
rotate.cpp:18:54: error: no matching function for call to ‘rotate(<brace-enclosed initializer list>, int)’
18 | rotate({vec[i].se}, vec[j].fi+25000-vec[i].fi);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from rotate.cpp:3:
/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:18:54: note: candidate expects 3 arguments, 2 provided
18 | rotate({vec[i].se}, vec[j].fi+25000-vec[i].fi);
| ^
In file included from /usr/include/c+