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_20610641_18404.cpp:16:25: error: stray '#' in program
     using namespace std;#define ISZREO(x) (fabs(x)<1e-7)const double PI = acos(-1.0);struct Point{    double x,y;}a[1100],c[1100],Q;double b[800]; void fun1(int n){    int i;    for(i=0;i<n;i++)    {        c[i].x=a[i].x-Q.x;        c[i].y=a[i].y-Q.y;    }} void fun2(int n){    int i;    for(i=0;i<n;i++)    {        b[i]=atan2(c[i].y,c[i].x);        if(b[i]<0)b[i]+=PI;    }    sort(b,b+n);} int main(){    int i,n,j,ans,cy;    double ji,p;    Point temp;    while(~scanf("%d",&n))    {        for(i=0;i<n;i++)        {            scanf("%lf %lf",&a[i].x,&a[i].y);        }        ans=0;        for(i=0;i<n;i++)        {            Q=a[i];            fun1(n);            fun2(n);            ji=-9999999.99;            for(j=0;j<n;j++)            {                if(!ISZREO(ji-b[j]))                {                    cy=1;                    ji=b[j];                }                else                 {                    cy++;                    if(cy>ans)                    {                        ans=cy;                        p=ji;                    }                }            }        }        if(ans == 0)ans++;        if(!ISZREO(p))ans++;        printf("%d\n",ans);    }    return 0;}
                         ^
0_0_20610641_18404.cpp:16:26: error: 'define' does not name a type
     using namespace std;#define ISZREO(x) (fabs(x)<1e-7)const double PI = acos(-1.0);struct Point{    double x,y;}a[1100],c[1100],Q;double b[800]; void fun1(int n){    int i;    for(i=0;i<n;i++)    {        c[i].x=a[i].x-Q.x;        c[i].y=a[i].y-Q.y;    }} void fun2(int n){    int i;    for(i=0;i<n;i++)    {        b[i]=atan2(c[i].y,c[i].x);        if(b[i]<0)b[i]+=PI;    }    sort(b,b+n);} int main(){    int i,n,j,ans,cy;    double ji,p;    Point temp;    while(~scanf("%d",&n))    {        for(i=0;i<n;i++)        {            scanf("%lf %lf",&a[i].x,&a[i].y);        }        ans=0;        for(i=0;i<n;i++)        {            Q=a[i];            fun1(n);            fun2(n);            ji=-9999999.99;            for(j=0;j<n;j++)            {                if(!ISZREO(ji-b[j]))                {                    cy=1;                    ji=b[j];                }                else                 {                    cy++;                    if(cy>ans)                    {                        ans=cy;                        p=ji;                    }                }            }        }        if(ans == 0)ans++;        if(!ISZREO(p))ans++;        printf("%d\n",ans);    }    return 0;}
                          ^
0_0_20610641_18404.cpp: In function 'void fun2(int)':
0_0_20610641_18404.cpp:16:369: error: 'PI' was not declared in this scope
     using namespace std;#define ISZREO(x) (fabs(x)<1e-7)const double PI = acos(-1.0);struct Point{    double x,y;}a[1100],c[1100],Q;double b[800]; void fun1(int n){    int i;    for(i=0;i<n;i++)    {        c[i].x=a[i].x-Q.x;        c[i].y=a[i].y-Q.y;    }} void fun2(int n){    int i;    for(i=0;i<n;i++)    {        b[i]=atan2(c[i].y,c[i].x);        if(b[i]<0)b[i]+=PI;    }    sort(b,b+n);} int main(){    int i,n,j,ans,cy;    double ji,p;    Point temp;    while(~scanf("%d",&n))    {        for(i=0;i<n;i++)        {            scanf("%lf %lf",&a[i].x,&a[i].y);        }        ans=0;        for(i=0;i<n;i++)        {            Q=a[i];            fun1(n);            fun2(n);            ji=-9999999.99;            for(j=0;j<n;j++)            {                if(!ISZREO(ji-b[j]))                {                    cy=1;                    ji=b[j];                }                else                 {                    cy++;                    if(cy>ans)                    {                        ans=cy;                        p=ji;                    }                }            }        }        if(ans == 0)ans++;        if(!ISZREO(p))ans++;        printf("%d\n",ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                 ^
0_0_20610641_18404.cpp: In function 'int main()':
0_0_20610641_18404.cpp:16:784: error: 'ISZREO' was not declared in this scope
     using namespace std;#define ISZREO(x) (fabs(x)<1e-7)const double PI = acos(-1.0);struct Point{    double x,y;}a[1100],c[1100],Q;double b[800]; void fun1(int n){    int i;    for(i=0;i<n;i++)    {        c[i].x=a[i].x-Q.x;        c[i].y=a[i].y-Q.y;    }} void fun2(int n){    int i;    for(i=0;i<n;i++)    {        b[i]=atan2(c[i].y,c[i].x);        if(b[i]<0)b[i]+=PI;    }    sort(b,b+n);} int main(){    int i,n,j,ans,cy;    double ji,p;    Point temp;    while(~scanf("%d",&n))    {        for(i=0;i<n;i++)        {            scanf("%lf %lf",&a[i].x,&a[i].y);        }        ans=0;        for(i=0;i<n;i++)        {            Q=a[i];            fun1(n);            fun2(n);            ji=-9999999.99;            for(j=0;j<n;j++)            {                if(!ISZREO(ji-b[j]))                {                    cy=1;                    ji=b[j];                }                else                 {                    cy++;                    if(cy>ans)                    {                        ans=cy;                        p=ji;                    }                }            }        }        if(ans == 0)ans++;        if(!ISZREO(p))ans++;        printf("%d\n",ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^
0_0_20610641_18404.cpp:16:1153: error: 'ISZREO' was not declared in this scope
     using namespace std;#define ISZREO(x) (fabs(x)<1e-7)const double PI = acos(-1.0);struct Point{    double x,y;}a[1100],c[1100],Q;double b[800]; void fun1(int n){    int i;    for(i=0;i<n;i++)    {        c[i].x=a[i].x-Q.x;        c[i].y=a[i].y-Q.y;    }} void fun2(int n){    int i;    for(i=0;i<n;i++)    {        b[i]=atan2(c[i].y,c[i].x);        if(b[i]<0)b[i]+=PI;    }    sort(b,b+n);} int main(){    int i,n,j,ans,cy;    double ji,p;    Point temp;    while(~scanf("%d",&n))    {        for(i=0;i<n;i++)        {            scanf("%lf %lf",&a[i].x,&a[i].y);        }        ans=0;        for(i=0;i<n;i++)        {            Q=a[i];            fun1(n);            fun2(n);            ji=-9999999.99;            for(j=0;j<n;j++)            {                if(!ISZREO(ji-b[j]))                {                    cy=1;                    ji=b[j];                }                else                 {                    cy++;                    if(cy>ans)                    {                        ans=cy;                        p=ji;                    }                }            }        }        if(ans == 0)ans++;        if(!ISZREO(p))ans++;        printf("%d\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-17 18:28:44, Gzip enabled