Problem potatoqueue
User hwy
Submission Time 2023-06-10 21:58:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatoqueue.cpp:12:1: error: declaration of ‘auto index’ has no initializer
12 | auto index;
| ^~~~
potatoqueue.cpp: In function ‘int query(int)’:
potatoqueue.cpp:38:93: error: overloaded function with no contextual type information
38 | index = upper_bound(copy1.begin(), copy1.begin()+N, make_pair(q[N-1], MAXN)) - copy1.begin();
| ^
potatoqueue.cpp:39:12: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator==’
39 | if (index == N) {
| ~~~~~~^~~~
potatoqueue.cpp:42:15: error: no match for ‘operator[]’ (operand types are ‘std::deque<std::pair<int, int> >’ and ‘<unresolved overloaded function type>’)
42 | index = copy1[index].second;
| ^
In file included from /usr/include/c++/9/deque:67,
from /usr/include/x86_