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_20613361_32218.cpp:4:25: error: stray '#' in program
     using namespace std;#define EPS 1e-8int main(){    int t,i,ca=1;    scanf("%d",&t);    double ti,g=10;    double x0[3],vx[3],vy[3],d[3],v[3];    double a,b,t1,c;    while(t--){        for(i=0;i<3;i++)scanf("%lf",x0+i);        for(i=0;i<3;i++)scanf("%lf",v+i);        for(i=0;i<3;i++)scanf("%lf",d+i);        for(i=0;i<3;i++){            vx[i]=v[i]*cos(d[i]);            vy[i]=v[i]*sin(d[i]);            if(i==0 || ti>2*vy[i]/g)                ti=2*vy[i]/g;        }        a=(vx[0]-vx[1])*(vy[1]-vy[2])-((vx[1]-vx[2])*(vy[0]-vy[1]));        b=(x0[0]-x0[1])*(vy[1]-vy[2])-(x0[1]-x0[2])*(vy[0]-vy[1]);        printf("Case #%d: ",ca++);        if(ti<EPS)            printf("-1\n");        else if(fabs(a)<EPS && fabs(b)<EPS)            printf("Multiply answer\n");        else if(fabs(a)<EPS)            printf("-1\n");        else{            t1=-b/a;            if(t1>EPS && ti-t1>-EPS )                printf("%.4lf\n",t1+EPS);            else                printf("-1\n");        }    }    return 0;}
                         ^
0_0_20613361_32218.cpp:4:26: error: 'define' does not name a type
     using namespace std;#define EPS 1e-8int main(){    int t,i,ca=1;    scanf("%d",&t);    double ti,g=10;    double x0[3],vx[3],vy[3],d[3],v[3];    double a,b,t1,c;    while(t--){        for(i=0;i<3;i++)scanf("%lf",x0+i);        for(i=0;i<3;i++)scanf("%lf",v+i);        for(i=0;i<3;i++)scanf("%lf",d+i);        for(i=0;i<3;i++){            vx[i]=v[i]*cos(d[i]);            vy[i]=v[i]*sin(d[i]);            if(i==0 || ti>2*vy[i]/g)                ti=2*vy[i]/g;        }        a=(vx[0]-vx[1])*(vy[1]-vy[2])-((vx[1]-vx[2])*(vy[0]-vy[1]));        b=(x0[0]-x0[1])*(vy[1]-vy[2])-(x0[1]-x0[2])*(vy[0]-vy[1]);        printf("Case #%d: ",ca++);        if(ti<EPS)            printf("-1\n");        else if(fabs(a)<EPS && fabs(b)<EPS)            printf("Multiply answer\n");        else if(fabs(a)<EPS)            printf("-1\n");        else{            t1=-b/a;            if(t1>EPS && ti-t1>-EPS )                printf("%.4lf\n",t1+EPS);            else                printf("-1\n");        }    }    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-26 03:08:02, Gzip enabled