Problem adjlist
User asbx
Submission Time 2023-11-10 10:31:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjlist.cpp:14:1: error: stray ‘\342’ in program
14 | …
| ^
adjlist.cpp:14:2: error: stray ‘\200’ in program
14 | …
| ^
adjlist.cpp:14:3: error: stray ‘\246’ in program
14 | …
| ^
adjlist.cpp: In function ‘int main()’:
adjlist.cpp:6:1: error: ‘vector’ was not declared in this scope
6 | vector<int> g[1005];
| ^~~~~~
adjlist.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 |
adjlist.cpp:6:8: error: expected primary-expression before ‘int’
6 | vector<int> g[1005];
| ^~~
adjlist.cpp:11:5: error: ‘g’ was not declared in this scope
11 | g[A].push_back(B); // there is an edge connecting A to B
| ^
adjlist.cpp:17:15: error: ‘g’ was not declared in this scope
17 | for (auto j: g[i]) { //iterate throug