Problem adjlist
User asruby
Submission Time 2024-04-11 00:06:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjlist.cpp: In function ‘int main()’:
adjlist.cpp:58:10: error: request for member ‘push_back’ in ‘g[A]’, which is of non-class type ‘std::vector<std::vector<long long int> > [1005]’
58 | g[A].push_back(B);
| ^~~~~~~~~
adjlist.cpp:59:10: error: request for member ‘push_back’ in ‘g[B]’, which is of non-class type ‘std::vector<std::vector<long long int> > [1005]’
59 | g[B].push_back(A); // if graph is undirected
| ^~~~~~~~~
adjlist.cpp:61:13: error: request for member ‘size’ in ‘g’, which is of non-class type ‘std::vector<std::vector<long long int> > [1005][1005]’
61 | iloopf(0,g.size()){
| ^~~~
adjlist.cpp:20:40: note: in definition of macro ‘iloopf’
20 | #define iloopf(a,b) for (int i = a;i < b;i++)
| ^
adjlist.cpp:63:14: error: request for member ‘size’ in ‘g’, which is of non-class type ‘std::v