Problem subgraphs
User jovann
Submission Time 2026-05-09 20:11:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

subgraphs.cpp:4:22: error: two or more data types in declaration of ‘dfs’
4 | void int dfs(int node) {
| ^
subgraphs.cpp: In function ‘int main()’:
subgraphs.cpp:16:16: error: expected ‘;’ before ‘for’
16 | cin >> N >> E
| ^
| ;
17 | for (int i =0;i<E; i++) {
| ~~~
subgraphs.cpp:17:17: error: ‘i’ was not declared in this scope
17 | for (int i =0;i<E; i++) {
| ^
subgraphs.cpp:25:11: error: ‘visited’ was not declared in this scope
25 | if(!visited[neighbour]) {
| ^~~~~~~
subgraphs.cpp:25:19: error: ‘neighbour’ was not declared in this scope
25 | if(!visited[neighbour]) {
| ^~~~~~~~~
subgraphs.cpp:26:9: error: ‘dfs’ was not declared in this scope; did you mean ‘ffs’?
26 | dfs(i);
| ^~~
|