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