Problem | adjlist |
---|---|
User | Dolphy |
Submission Time | 2023-07-12 16:40:14 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
adjlist.cpp: In function ‘int main()’:
adjlist.cpp:6:5: error: ‘vector’ was not declared in this scope
6 | vector <int> adjlist[n];
| ^~~~~~
adjlist.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
adjlist.cpp:6:13: error: expected primary-expression before ‘int’
6 | vector <int> adjlist[n];
| ^~~
adjlist.cpp:10:9: error: ‘adjlist’ was not declared in this scope
10 | adjlist[a-1].push_back(b-1);
| ^~~~~~~
adjlist.cpp:14:22: error: ‘adjlist’ was not declared in this scope
14 | for (auto it:adjlist[i]){
| ^~~~~~~