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_20612306_5415.cpp:12:25: error: stray '#' in program
     using namespace std;#define inf 0x6f6f6f6f double liangdianzhijiandejuli(double ax,double ay,double x1,double y1){    return sqrt((ax-x1)*(ax-x1)+(ay-y1)*(ay-y1));}int main(){    int t;    scanf("%d",&t);    while(t--)    {        double ax,ay,bx,by,cx,cy,k,l;        double x1,y1,ans;        scanf("%lf",&k);        scanf("%lf%lf%lf%lf%lf%lf",&ax,&ay,&bx,&by,&cx,&cy);        if((k*ax-ay-k*cx+cy)*(k*bx-by-k*cx+cy)>0)        {            y1=(2*bx*k+by*k*k-by-2*k*cx+2*cy)/(k*k+1);            x1=bx-(y1-by)*k;            ans=liangdianzhijiandejuli(ax,ay,x1,y1);        }        else             ans=liangdianzhijiandejuli(ax,ay,bx,by);             printf("%.2lf\n",ans);    }    return 0;}
                         ^
0_0_20612306_5415.cpp:12:26: error: 'define' does not name a type
     using namespace std;#define inf 0x6f6f6f6f double liangdianzhijiandejuli(double ax,double ay,double x1,double y1){    return sqrt((ax-x1)*(ax-x1)+(ay-y1)*(ay-y1));}int main(){    int t;    scanf("%d",&t);    while(t--)    {        double ax,ay,bx,by,cx,cy,k,l;        double x1,y1,ans;        scanf("%lf",&k);        scanf("%lf%lf%lf%lf%lf%lf",&ax,&ay,&bx,&by,&cx,&cy);        if((k*ax-ay-k*cx+cy)*(k*bx-by-k*cx+cy)>0)        {            y1=(2*bx*k+by*k*k-by-2*k*cx+2*cy)/(k*k+1);            x1=bx-(y1-by)*k;            ans=liangdianzhijiandejuli(ax,ay,x1,y1);        }        else             ans=liangdianzhijiandejuli(ax,ay,bx,by);             printf("%.2lf\n",ans);    }    return 0;}
                          ^
0_0_20612306_5415.cpp: In function 'int main()':
0_0_20612306_5415.cpp:12:564: error: 'liangdianzhijiandejuli' was not declared in this scope
     using namespace std;#define inf 0x6f6f6f6f double liangdianzhijiandejuli(double ax,double ay,double x1,double y1){    return sqrt((ax-x1)*(ax-x1)+(ay-y1)*(ay-y1));}int main(){    int t;    scanf("%d",&t);    while(t--)    {        double ax,ay,bx,by,cx,cy,k,l;        double x1,y1,ans;        scanf("%lf",&k);        scanf("%lf%lf%lf%lf%lf%lf",&ax,&ay,&bx,&by,&cx,&cy);        if((k*ax-ay-k*cx+cy)*(k*bx-by-k*cx+cy)>0)        {            y1=(2*bx*k+by*k*k-by-2*k*cx+2*cy)/(k*k+1);            x1=bx-(y1-by)*k;            ans=liangdianzhijiandejuli(ax,ay,x1,y1);        }        else             ans=liangdianzhijiandejuli(ax,ay,bx,by);             printf("%.2lf\n",ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
0_0_20612306_5415.cpp:12:638: error: 'liangdianzhijiandejuli' was not declared in this scope
     using namespace std;#define inf 0x6f6f6f6f double liangdianzhijiandejuli(double ax,double ay,double x1,double y1){    return sqrt((ax-x1)*(ax-x1)+(ay-y1)*(ay-y1));}int main(){    int t;    scanf("%d",&t);    while(t--)    {        double ax,ay,bx,by,cx,cy,k,l;        double x1,y1,ans;        scanf("%lf",&k);        scanf("%lf%lf%lf%lf%lf%lf",&ax,&ay,&bx,&by,&cx,&cy);        if((k*ax-ay-k*cx+cy)*(k*bx-by-k*cx+cy)>0)        {            y1=(2*bx*k+by*k*k-by-2*k*cx+2*cy)/(k*k+1);            x1=bx-(y1-by)*k;            ans=liangdianzhijiandejuli(ax,ay,x1,y1);        }        else             ans=liangdianzhijiandejuli(ax,ay,bx,by);             printf("%.2lf\n",ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^


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-29 19:30:05, Gzip enabled