QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#621855 | #8650. Island Hopping | hhoppitree# | Compile Error | / | / | C++17 | 304b | 2024-10-08 17:37:21 | 2024-10-08 17:37:22 |
Judging History
answer
#include "island.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int vis[N];
void dfs(int x, int fa) {
for (int i = 1, v; ; ++i) {
if ((v = query(i, n)) == fa) break;
answer(x, v), dfs(v, x);
}
}
void solve(int n, int) {
dfs(n, 0);
}
Details
answer.code: In function ‘void dfs(int, int)’: answer.code:12:27: error: ‘n’ was not declared in this scope 12 | if ((v = query(i, n)) == fa) break; | ^