Problem subgraphs
User asbx
Submission Time 2023-11-10 13:23:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

subgraphs.cpp:8:17: error: array bound is not an integer constant before ‘]’ token
8 | bool visited[V+1];
| ^
subgraphs.cpp: In function ‘void dfs(int)’:
subgraphs.cpp:10:6: error: ‘visited’ was not declared in this scope
10 | if (visited[x]) return;
| ^~~~~~~
subgraphs.cpp:11:2: error: ‘visited’ was not declared in this scope
11 | visited[x] = true;
| ^~~~~~~
subgraphs.cpp: In function ‘int main()’:
subgraphs.cpp:29:7: error: ‘visited’ was not declared in this scope
29 | if (visited[i]!=true){
| ^~~~~~~