Submission #1324873

#TimeUsernameProblemLanguageResultExecution timeMemory
1324873kenkunkinIsland Hopping (JOI24_island)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;


const int maxn=3e2+5;
bool d[maxn];
void solve(int n,int l)
{
    d[1]=1;
    for (int i=1;i<n;i++)
    {
        int x=query(1,i);
        if (d[x])   continue;
        d[x]=1;
        for (int j=1;j<n;j++)
        {
            int y=query(x,j);
            answer(x,y);
            if (d[y]) break;
            d[y]=1;
        }
    }
}

Compilation message (stderr)

island.cpp: In function 'void solve(int, int)':
island.cpp:13:15: error: 'query' was not declared in this scope
   13 |         int x=query(1,i);
      |               ^~~~~
island.cpp:19:13: error: 'answer' was not declared in this scope
   19 |             answer(x,y);
      |             ^~~~~~