Problem | ancestor |
---|---|
User | hwy |
Submission Time | 2023-08-19 10:22:34 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
ancestor.cpp: In function ‘int main()’:
ancestor.cpp:41:18: error: request for member ‘push_back’ in ‘edges.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)a))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type’ {aka ‘long long int’}
41 | edges[a].push_back(b);
| ^~~~~~~~~
ancestor.cpp:42:18: error: request for member ‘push_back’ in ‘edges.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)b))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type’ {aka ‘long long int’}
42 | edges[b].push_back(a);
| ^~~~~~~~~
ancestor.cpp:57:14: error: declaration of ‘auto neighbour’ has no initializer
57 | for (auto neighbour, edges[cur]) {
| ^~~~
anc