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_20612364_32684.cpp:2:14: error: #include expects "FILENAME" or <FILENAME>
     #include "math.h"int e[2001][2];//杈[0],to.[1]next;int a[1001][5];//[0],ID,[1]next;2x3y4zint c[1001];int cnum;int max;int m;bool sign[1001];int n;//圭扮int en;//杈圭扮void initt();void init();int DFS(int s);int eq(int x);int main(){     while(1)    {        scanf("%d",&n);        if(n==0)return 0;        initt();        init();        int min=1000;        int i;        for(i=1;i<=n;i++)//n娆DFS        {            max=0;            m=0;            DFS(i);            if(max<min)min=max,c[1]=a[i][0],cnum=1;            else if(max==min)cnum++,c[cnum]=a[i][0];            else ;        }         if(cnum==1)printf("%d",c[1]);         else          {             if(c[1]>
              ^
0_0_20612364_32684.cpp:3:5: error: 'c' does not name a type
     c[2])printf("%d %d",c[2],c[1]);             else printf("%d %d",c[1],c[2]);         }         printf("\n");    } }int DFS(int s){    if(sign[s])return 0;    if((!e[a[s][1]][1])&&sign[e[a[s][1]][0]]){        if(max<m){max=m; return 0;}        else return 0;}    m++;    sign[s]=true;    int next=a[s][1];    while(next)    {        DFS(e[next][0]);         next=e[next][1];    }    m--;sign[s]=false;    return 0;}void initt(){    int i;    cnum=0;    for(i=0;i<=n;i++)        a[i][1]=0;    for(i=0;i<=2*n;i++)         e[i][1]=0;}void init(){    int k=0;int en=0;        k++;        int id;int x;int y;int z;        scanf("%d%d%d%d",&id,&x,&y,&z);        a[k][0]=id;a[k][2]=x,a[k][3]=y,a[k][4]=z;    while(k<n)    {        k++;         scanf("%d%d%d%d",&id,&x,&y,&z);        a[k][0]=id;a[k][2]=x,a[k][3]=y,a[k][4]=z;        int ee;ee=eq(k);        en++;e[en][0]=ee;e[en][1]=a[k][1];a[k][1]=en;        en++;e[en][0]=k;e[en][1]=a[ee][1];a[ee][1]=en;    }}int eq(int x){    int i;double min=10000;int xx;    for(i=1;i<x;i++)    {        double temp=((a[x][3]-a[i][3])*(a[x][3]-a[i][3])+(a[x][4]-a[i][4])*(a[x][4]-a[i][4])+(a[x][2]-a[i][2])*(a[x][2]-a[i][2]));        double val=sqrt(temp);         if(val<min)min=val,xx=i;    }    return xx;}
     ^
0_0_20612364_32684.cpp:3:49: error: expected unqualified-id before 'else'
     c[2])printf("%d %d",c[2],c[1]);             else printf("%d %d",c[1],c[2]);         }         printf("\n");    } }int DFS(int s){    if(sign[s])return 0;    if((!e[a[s][1]][1])&&sign[e[a[s][1]][0]]){        if(max<m){max=m; return 0;}        else return 0;}    m++;    sign[s]=true;    int next=a[s][1];    while(next)    {        DFS(e[next][0]);         next=e[next][1];    }    m--;sign[s]=false;    return 0;}void initt(){    int i;    cnum=0;    for(i=0;i<=n;i++)        a[i][1]=0;    for(i=0;i<=2*n;i++)         e[i][1]=0;}void init(){    int k=0;int en=0;        k++;        int id;int x;int y;int z;        scanf("%d%d%d%d",&id,&x,&y,&z);        a[k][0]=id;a[k][2]=x,a[k][3]=y,a[k][4]=z;    while(k<n)    {        k++;         scanf("%d%d%d%d",&id,&x,&y,&z);        a[k][0]=id;a[k][2]=x,a[k][3]=y,a[k][4]=z;        int ee;ee=eq(k);        en++;e[en][0]=ee;e[en][1]=a[k][1];a[k][1]=en;        en++;e[en][0]=k;e[en][1]=a[ee][1];a[ee][1]=en;    }}int eq(int x){    int i;double min=10000;int xx;    for(i=1;i<x;i++)    {        double temp=((a[x][3]-a[i][3])*(a[x][3]-a[i][3])+(a[x][4]-a[i][4])*(a[x][4]-a[i][4])+(a[x][2]-a[i][2])*(a[x][2]-a[i][2]));        double val=sqrt(temp);         if(val<min)min=val,xx=i;    }    return xx;}
                                                 ^
0_0_20612364_32684.cpp:3:89: error: expected declaration before '}' token
     c[2])printf("%d %d",c[2],c[1]);             else printf("%d %d",c[1],c[2]);         }         printf("\n");    } }int DFS(int s){    if(sign[s])return 0;    if((!e[a[s][1]][1])&&sign[e[a[s][1]][0]]){        if(max<m){max=m; return 0;}        else return 0;}    m++;    sign[s]=true;    int next=a[s][1];    while(next)    {        DFS(e[next][0]);         next=e[next][1];    }    m--;sign[s]=false;    return 0;}void initt(){    int i;    cnum=0;    for(i=0;i<=n;i++)        a[i][1]=0;    for(i=0;i<=2*n;i++)         e[i][1]=0;}void init(){    int k=0;int en=0;        k++;        int id;int x;int y;int z;        scanf("%d%d%d%d",&id,&x,&y,&z);        a[k][0]=id;a[k][2]=x,a[k][3]=y,a[k][4]=z;    while(k<n)    {        k++;         scanf("%d%d%d%d",&id,&x,&y,&z);        a[k][0]=id;a[k][2]=x,a[k][3]=y,a[k][4]=z;        int ee;ee=eq(k);        en++;e[en][0]=ee;e[en][1]=a[k][1];a[k][1]=en;        en++;e[en][0]=k;e[en][1]=a[ee][1];a[ee][1]=en;    }}int eq(int x){    int i;double min=10000;int xx;    for(i=1;i<x;i++)    {        double temp=((a[x][3]-a[i][3])*(a[x][3]-a[i][3])+(a[x][4]-a[i][4])*(a[x][4]-a[i][4])+(a[x][2]-a[i][2])*(a[x][2]-a[i][2]));        double val=sqrt(temp);         if(val<min)min=val,xx=i;    }    return xx;}
                                                                                         ^


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-26 17:21:53, Gzip enabled