Problem oranges2
User PlayVoltz
Submission Time 2023-09-06 13:14:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

oranges2.cpp: In function ‘void precalc(long int)’:
oranges2.cpp:58:59: error: no matching function for call to ‘std::queue<long int>::push(std::pair<long int, long int>)’
58 | q.push(make_pair(oranges[start][num.first], num.first));
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from oranges2.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:259:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = long int; _Sequence = std::deque<long int, std::allocator<long int> >; std::queue<_Tp, _Sequence>::value_type = long int]’
259 | push(const value_type& __x)
| ^~~~
/usr/include/c++/9/bits/stl_queue.h:259:30: note: no known conversion for argument 1 from ‘std::pair<long int, long int>’ to ‘const value_