Problem | snakenladder |
---|---|
User | kahchun |
Submission Time | 2023-11-17 12:29:29 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
snakenladder.cpp: In function ‘int main()’:
snakenladder.cpp:27:16: error: ‘class std::queue<std::pair<int, int> >’ has no member named ‘top’; did you mean ‘pop’?
27 | int curr = q.top().first, roll = q.top().second;
| ^~~
| pop
snakenladder.cpp:32:12: error: ‘roll’ was not declared in this scope
32 | cout << roll << endl;
| ^~~~
snakenladder.cpp:38:38: error: ‘roll’ was not declared in this scope
38 | q.push(make_pair(snekLadd[curr], roll));
| ^~~~
snakenladder.cpp:51:29: error: ‘roll’ was not declared in this scope
51 | q.push(make_pair(next, roll + 1));
| ^~~~