Submission #1129777

#TimeUsernameProblemLanguageResultExecution timeMemory
1129777ohadIsland Hopping (JOI24_island)C++20
Compilation error
0 ms0 KiB
#include "island.h"
#include<bits/stdc++.h>
using namespace std;

void solve(int N, int L){
    queue<int> q;
    for(int i = 1; i < N; i++){
        q.push(query(1,i));
    }
    while(!q.empty()){
        answer(q.top(),query(q.top(),1));
        q.pop();
    }
}

Compilation message (stderr)

island.cpp: In function 'void solve(int, int)':
island.cpp:11:18: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   11 |         answer(q.top(),query(q.top(),1));
      |                  ^~~
      |                  pop
island.cpp:11:32: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   11 |         answer(q.top(),query(q.top(),1));
      |                                ^~~
      |                                pop