Problem subgraphs
User ryelin
Submission Time 2023-11-10 14:02:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

subgraphs.cpp:1:1: error: ‘vector’ does not name a type
1 | vector<int>adjlist[N+5];
| ^~~~~~
subgraphs.cpp:2:14: error: ‘N’ was not declared in this scope
2 | bool visited[N+5];
| ^
subgraphs.cpp: In function ‘void dfs(int)’:
subgraphs.cpp:5:5: error: ‘visited’ was not declared in this scope
5 | if (visited[x]) return;
| ^~~~~~~
subgraphs.cpp:6:1: error: ‘visited’ was not declared in this scope
6 | visited[x] = true;
| ^~~~~~~
subgraphs.cpp:7:14: error: ‘adjlist’ was not declared in this scope
7 | for (auto i: adjlist[x]) {
| ^~~~~~~
subgraphs.cpp: In function ‘int main()’:
subgraphs.cpp:21:5: error: expected ‘,’ or ‘;’ before ‘for’
21 | for(int i=0; i<N; i++){
| ^~~
subgraphs.cpp:21:18: error: ‘i’ was not declared in this scope
21 | for(int i=0; i<N; i++){
| ^