0_0_14775578_26380.cpp: In function 'int dfs(int, std::vector<int>&)':
0_0_14775578_26380.cpp:31:32: error: request for member 'size' in '(& vec)->std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)u))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
for (int i = 0; i < vec[u].size(); ++i)
^
0_0_14775578_26380.cpp:33:25: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}[int]' for array subscript
int j = vec[u][i];
^
0_0_14775578_26380.cpp: In function 'int main()':
0_0_14775578_26380.cpp:49:39: error: request for member 'clear' in 'vec', which is of non-class type 'std::vector<int> [6010]'
scanf("%d", &val[i]), vec.clear();
^
0_0_14775578_26380.cpp:61:34: error: invalid initialization of non-const reference of type 'std::vector<int>&' from an rvalue of type 'std::vector<int>*'
ans += dfs(i, vec);
^
0_0_14775578_26380.cpp:28:5: note: in passing argument 2 of 'int dfs(int, std::vector<int>&)'
int dfs(int u, vector<int>& vec)
^
|