Problem | adjlist |
---|---|
User | Adflhjk |
Submission Time | 2023-11-10 13:24:34 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
adjlist.cpp: In function ‘int main()’:
adjlist.cpp:7:5: error: ‘vector’ was not declared in this scope
7 | 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:7:12: error: expected primary-expression before ‘int’
7 | vector<int> g[1005];
| ^~~
adjlist.cpp:12:5: error: ‘g’ was not declared in this scope
12 | 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 through vector g[i]
| ^