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_13796885_3963.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
 #include int pre[1000 ];
          ^
0_0_13796885_3963.cpp: In function 'int find(int)':
0_0_13796885_3963.cpp:4:8: error: 'pre' was not declared in this scope
 while (pre[r ]!=r)
        ^
0_0_13796885_3963.cpp:9:3: error: 'pre' was not declared in this scope
 j=pre[i ]; pre[i ]=r; i=j;
   ^
0_0_13796885_3963.cpp: In function 'int main()':
0_0_13796885_3963.cpp:15:20: error: 'scanf' was not declared in this scope
 while(scanf("%d",&n) && n)//读入n,如果n为0,结束 { //刚开始的时候,有n个城镇,一条路都没有 //那么要修n-1条路才能把它们连起来
                    ^
0_0_13796885_3963.cpp:18:21: error: 'pre' was not declared in this scope
 for(i=1;i<=n;i++) { pre[i ]=i; } //共有m条路
                     ^
0_0_13796885_3963.cpp:19:14: error: 'scanf' was not declared in this scope
 scanf("%d",&m); while(m--) { //下面这段代码,其实就是join函数,只是稍作改动以适应题目要求
              ^
0_0_13796885_3963.cpp:25:14: error: 'pre' was not declared in this scope
 if(f1!=f2) { pre[f2 ]=f1; total--;
              ^
0_0_13796885_3963.cpp:30:20: error: 'printf' was not declared in this scope
 printf("%d\n",total); } return 0;
                    ^
0_0_13796885_3963.cpp: At global scope:
0_0_13796885_3963.cpp:30:25: error: expected unqualified-id before 'return'
 printf("%d\n",total); } return 0;
                         ^
0_0_13796885_3963.cpp:31:1: error: expected declaration before '}' token
 }
 ^


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-23 04:17:46, Gzip enabled