Problem | subgraphs |
---|---|
User | BigEd15 |
Submission Time | 2025-06-02 15:09:35 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
subgraphs.cpp:6:23: error: array bound is not an integer constant before ‘]’ token
6 | vector<int> g[MAXNODES];
| ^
subgraphs.cpp:7:22: error: array bound is not an integer constant before ‘]’ token
7 | bool visited[MAXNODES];
| ^
subgraphs.cpp:8:22: error: array bound is not an integer constant before ‘]’ token
8 | int distance[MAXNODES];
| ^
subgraphs.cpp: In function ‘void BFS(long long int)’:
subgraphs.cpp:12:2: error: ‘visited’ was not declared in this scope
12 | visited[start]=1;
| ^~~~~~~
subgraphs.cpp:13:16: error: invalid types ‘<unresolved overloaded function type>[long long int]’ for array subscript
13 | distance[start]=0;
| ^
subgraphs.cpp:20:21: error: ‘g’ was not declared in this scope
20 | for (int neighbor:g[current]) {
| ^
subgraphs.cpp:24:22: