| Problem | rotate |
|---|---|
| User | bribritt |
| Submission Time | 2025-05-20 22:59:00 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
rotate.cpp: In function ‘void energy(int, std::vector<std::pair<int, int> >)’:
rotate.cpp:7:18: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type’ {aka ‘std::pair<int, int>’} and ‘<brace-enclosed initializer list>’)
7 | u[i] = {v[i], i};
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from rotate.h:1,
from rotate.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:378:7: note: candidate: ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type) [with _T1 = int; _T2 = int; typename std