Problem drones
User hwy
Submission Time 2023-06-22 20:20:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

drones.cpp:6:1: error: expected initializer before ‘vector’
6 | vector<bool> visited(N+1, false);
| ^~~~~~
drones.cpp: In function ‘void dfs(int)’:
drones.cpp:9:5: error: ‘visited’ was not declared in this scope
9 | visited[node] = true;
| ^~~~~~~
drones.cpp:10:2: error: ‘reachable’ was not declared in this scope
10 | reachable[node] = 1;
| ^~~~~~~~~
drones.cpp:11:24: error: ‘adjlst’ was not declared in this scope
11 | for (int neighbor: adjlst[node]) {
| ^~~~~~
drones.cpp:12:27: error: ‘neighbour’ was not declared in this scope; did you mean ‘neighbor’?
12 | auto temp = find(adjlst[neighbour].begin(), adjlst[neighbour].end(), node);
| ^~~~~~~~~
| neighbor
drones.cpp: In function ‘int main()’:
drones.cpp:23:2: error: ‘adjlst’ was not declared in this scope
23 | adjlst.resize(N+1