Problem | adjlist |
---|---|
User | asbx |
Submission Time | 2023-11-10 10:31:48 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
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:16:15: error: ‘g’ was not declared in this scope
16 | for (auto j: g[i]) { //iterate through vector g[i]
| ^