F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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)
     ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-24 19:43:29, Gzip enabled