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_35963693_15726.cpp:20:21: error: conflicting declaration 'std::vector<int> v [100005]'
 vector<int> v[100005];
                     ^
0_0_35963693_15726.cpp:18:5: note: previous declaration as 'int v [100005]'
 int v[100005];
     ^
0_0_35963693_15726.cpp: In function 'int main()':
0_0_35963693_15726.cpp:39:18: error: request for member 'push_back' in 'v[x]', which is of non-class type 'int'
             v[x].push_back(y);
                  ^
0_0_35963693_15726.cpp:40:18: error: request for member 'push_back' in 'v[y]', which is of non-class type 'int'
             v[y].push_back(x);
                  ^
0_0_35963693_15726.cpp: In function 'void dfs(int)':
0_0_35963693_15726.cpp:75:32: error: request for member 'size' in 'v[node]', which is of non-class type 'int'
     for(int i = 0; i < v[node].size(); i++)
                                ^
0_0_35963693_15726.cpp:77:24: error: invalid types 'int[int]' for array subscript
         if(!v[v[node][i]])
                        ^
0_0_35963693_15726.cpp:79:24: error: invalid types 'int[int]' for array subscript
             v[v[node][i]] = 1;
                        ^
0_0_35963693_15726.cpp:80:26: error: invalid types 'int[int]' for array subscript
             dfs(v[node][i]);
                          ^


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-22 20:24:47, Gzip enabled