Submission #1316797

#TimeUsernameProblemLanguageResultExecution timeMemory
1316797mikolaj00Island Hopping (JOI24_island)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; void solve(int N, int L) { vector<bool> vis(N+1); vis[1] = true; for (int i = 1; i < N; i++) { int x = query(1, i); if (vis[x]) continue; vis[x] = true; for (int j = 1; j < N; j++) { int y = query(x, j); if (vis[y]) break; vis[y] = true; answer(x, y); } } }

Compilation message (stderr)

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