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_17764161_4854.cpp:5:7: error: 'N' does not name a type
 const N=100005;
       ^
0_0_17764161_4854.cpp:6:8: error: 'N' was not declared in this scope
 int mp[N];
        ^
0_0_17764161_4854.cpp:7:7: error: 'N' was not declared in this scope
 int r[N];
       ^
0_0_17764161_4854.cpp: In function 'void init()':
0_0_17764161_4854.cpp:11:19: error: 'N' was not declared in this scope
    for(int i=1;i<=N;i++) r[i]=i;
                   ^
0_0_17764161_4854.cpp:11:26: error: 'r' was not declared in this scope
    for(int i=1;i<=N;i++) r[i]=i;
                          ^
0_0_17764161_4854.cpp:12:11: error: 'mp' was not declared in this scope
    memset(mp,0,sizeof(mp));
           ^
0_0_17764161_4854.cpp: In function 'int find(int)':
0_0_17764161_4854.cpp:17:11: error: 'r' was not declared in this scope
  while(x!=r[x])
           ^
0_0_17764161_4854.cpp:23:9: error: 'r' was not declared in this scope
   int j=r[u];
         ^
0_0_17764161_4854.cpp: In function 'void merge(int, int)':
0_0_17764161_4854.cpp:34:3: error: 'r' was not declared in this scope
   r[r1]=r2;
   ^
0_0_17764161_4854.cpp: In function 'int main()':
0_0_17764161_4854.cpp:53:10: error: 'mp' was not declared in this scope
       if(mp[i]&&r[i]==i) cnt++;
          ^
0_0_17764161_4854.cpp:53:17: error: 'r' was not declared in this scope
       if(mp[i]&&r[i]==i) cnt++;
                 ^
0_0_17764161_4854.cpp:63:3: error: 'mp' was not declared in this scope
   mp[a]=1;mp[b]=1;
   ^


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-12-03 06:42:44, Gzip enabled