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_20611383_12697.cpp:13:21: error: stray '#' in program
      0 ? (x) : -(x))#define clear1(A, X, SIZE) memset(A, X, sizeof(A[0]) * (SIZE))#define clearall(A, X) memset(A, X, sizeof(A))#define memcopy1(A , X, SIZE) memcpy(A , X ,sizeof(X[0])*(SIZE))#define memcopyall(A, X) memcpy(A , X ,sizeof(X))#define max( x, y )  ( ((x) > (y)) ? (x) : (y) )#define min( x, y )  ( ((x) < (y)) ? (x) : (y) ) using namespace std;struct node1{    double x,y,l,r;    bool operator <(const node1 a)const    {        return l<a.l;    }} Point[1005];int main(){    int n,T,ans,cnt;    double d,temp,now,drift,r;    scanf("%d",&T);    while(T--)    {        scanf("%d%lf",&n,&d);        for(int i=0; i<n; i++)        {            scanf("%lf%lf",&Point[i].x,&Point[i].y);            temp=sqrt(Point[i].x*Point[i].x+Point[i].y*Point[i].y);            if(temp<=d)            {                n--;                i--;            }            else            {                if(Point[i].x==0)                {                    if(Point[i].y>0)now=0.5*pi;                    else now=1.5*pi;                }                else if(Point[i].y==0)                {                    if(Point[i].x>0)now=0;                    else now=pi;                }                else                {                    now=asin(iabs(Point[i].y)/temp);                    if(Point[i].x<0&&Point[i].y>=0)now=pi-now;                    else if(Point[i].x<=0&&Point[i].y<0)now+=pi;                    else if(Point[i].x>0&&Point[i].y<=0)now=2*pi-now;                }                drift=asin(d/temp);                //printf("*%lf %lf\n",now,drift);                Point[i].l=now-drift;                Point[i].r=now+drift;            }        }        if(n==0)        {            puts("0");            continue;        }        sort(Point,Point+n);        for(int i=n; i<2*n; i++)        {            Point[i]=Point[i-n];            Point[i].l+=2*pi;            Point[i].r+=2*pi;        }        ans=inf;        for(int i=0; i<n; i++)        {            r=Point[i].r;            cnt=1;            for(int j=i+1; j<n+i; j++)            {                 if(r>Point[j].r)r=Point[j].r;                else if(r<Point[j].l)                {                    cnt++;                    r=Point[j].r;                }            }            ans=min(ans,cnt);        }        printf("%d\n",ans);    }    return 0;}
                     ^
0_0_20611383_12697.cpp:13:83: error: stray '#' in program
      0 ? (x) : -(x))#define clear1(A, X, SIZE) memset(A, X, sizeof(A[0]) * (SIZE))#define clearall(A, X) memset(A, X, sizeof(A))#define memcopy1(A , X, SIZE) memcpy(A , X ,sizeof(X[0])*(SIZE))#define memcopyall(A, X) memcpy(A , X ,sizeof(X))#define max( x, y )  ( ((x) > (y)) ? (x) : (y) )#define min( x, y )  ( ((x) < (y)) ? (x) : (y) ) using namespace std;struct node1{    double x,y,l,r;    bool operator <(const node1 a)const    {        return l<a.l;    }} Point[1005];int main(){    int n,T,ans,cnt;    double d,temp,now,drift,r;    scanf("%d",&T);    while(T--)    {        scanf("%d%lf",&n,&d);        for(int i=0; i<n; i++)        {            scanf("%lf%lf",&Point[i].x,&Point[i].y);            temp=sqrt(Point[i].x*Point[i].x+Point[i].y*Point[i].y);            if(temp<=d)            {                n--;                i--;            }            else            {                if(Point[i].x==0)                {                    if(Point[i].y>0)now=0.5*pi;                    else now=1.5*pi;                }                else if(Point[i].y==0)                {                    if(Point[i].x>0)now=0;                    else now=pi;                }                else                {                    now=asin(iabs(Point[i].y)/temp);                    if(Point[i].x<0&&Point[i].y>=0)now=pi-now;                    else if(Point[i].x<=0&&Point[i].y<0)now+=pi;                    else if(Point[i].x>0&&Point[i].y<=0)now=2*pi-now;                }                drift=asin(d/temp);                //printf("*%lf %lf\n",now,drift);                Point[i].l=now-drift;                Point[i].r=now+drift;            }        }        if(n==0)        {            puts("0");            continue;        }        sort(Point,Point+n);        for(int i=n; i<2*n; i++)        {            Point[i]=Point[i-n];            Point[i].l+=2*pi;            Point[i].r+=2*pi;        }        ans=inf;        for(int i=0; i<n; i++)        {            r=Point[i].r;            cnt=1;            for(int j=i+1; j<n+i; j++)            {                 if(r>Point[j].r)r=Point[j].r;                else if(r<Point[j].l)                {                    cnt++;                    r=Point[j].r;                }            }            ans=min(ans,cnt);        }        printf("%d\n",ans);    }    return 0;}
                                                                                   ^
0_0_20611383_12697.cpp:13:129: error: stray '#' in program
      0 ? (x) : -(x))#define clear1(A, X, SIZE) memset(A, X, sizeof(A[0]) * (SIZE))#define clearall(A, X) memset(A, X, sizeof(A))#define memcopy1(A , X, SIZE) memcpy(A , X ,sizeof(X[0])*(SIZE))#define memcopyall(A, X) memcpy(A , X ,sizeof(X))#define max( x, y )  ( ((x) > (y)) ? (x) : (y) )#define min( x, y )  ( ((x) < (y)) ? (x) : (y) ) using namespace std;struct node1{    double x,y,l,r;    bool operator <(const node1 a)const    {        return l<a.l;    }} Point[1005];int main(){    int n,T,ans,cnt;    double d,temp,now,drift,r;    scanf("%d",&T);    while(T--)    {        scanf("%d%lf",&n,&d);        for(int i=0; i<n; i++)        {            scanf("%lf%lf",&Point[i].x,&Point[i].y);            temp=sqrt(Point[i].x*Point[i].x+Point[i].y*Point[i].y);            if(temp<=d)            {                n--;                i--;            }            else            {                if(Point[i].x==0)                {                    if(Point[i].y>0)now=0.5*pi;                    else now=1.5*pi;                }                else if(Point[i].y==0)                {                    if(Point[i].x>0)now=0;                    else now=pi;                }                else                {                    now=asin(iabs(Point[i].y)/temp);                    if(Point[i].x<0&&Point[i].y>=0)now=pi-now;                    else if(Point[i].x<=0&&Point[i].y<0)now+=pi;                    else if(Point[i].x>0&&Point[i].y<=0)now=2*pi-now;                }                drift=asin(d/temp);                //printf("*%lf %lf\n",now,drift);                Point[i].l=now-drift;                Point[i].r=now+drift;            }        }        if(n==0)        {            puts("0");            continue;        }        sort(Point,Point+n);        for(int i=n; i<2*n; i++)        {            Point[i]=Point[i-n];            Point[i].l+=2*pi;            Point[i].r+=2*pi;        }        ans=inf;        for(int i=0; i<n; i++)        {            r=Point[i].r;            cnt=1;            for(int j=i+1; j<n+i; j++)            {                 if(r>Point[j].r)r=Point[j].r;                else if(r<Point[j].l)                {                    cnt++;                    r=Point[j].r;                }            }            ans=min(ans,cnt);        }        printf("%d\n",ans);    }    return 0;}
                                                                                                                                 ^
0_0_20611383_12697.cpp:13:193: error: stray '#' in program
      0 ? (x) : -(x))#define clear1(A, X, SIZE) memset(A, X, sizeof(A[0]) * (SIZE))#define clearall(A, X) memset(A, X, sizeof(A))#define memcopy1(A , X, SIZE) memcpy(A , X ,sizeof(X[0])*(SIZE))#define memcopyall(A, X) memcpy(A , X ,sizeof(X))#define max( x, y )  ( ((x) > (y)) ? (x) : (y) )#define min( x, y )  ( ((x) < (y)) ? (x) : (y) ) using namespace std;struct node1{    double x,y,l,r;    bool operator <(const node1 a)const    {        return l<a.l;    }} Point[1005];int main(){    int n,T,ans,cnt;    double d,temp,now,drift,r;    scanf("%d",&T);    while(T--)    {        scanf("%d%lf",&n,&d);        for(int i=0; i<n; i++)        {            scanf("%lf%lf",&Point[i].x,&Point[i].y);            temp=sqrt(Point[i].x*Point[i].x+Point[i].y*Point[i].y);            if(temp<=d)            {                n--;                i--;            }            else            {                if(Point[i].x==0)                {                    if(Point[i].y>0)now=0.5*pi;                    else now=1.5*pi;                }                else if(Point[i].y==0)                {                    if(Point[i].x>0)now=0;                    else now=pi;                }                else                {                    now=asin(iabs(Point[i].y)/temp);                    if(Point[i].x<0&&Point[i].y>=0)now=pi-now;                    else if(Point[i].x<=0&&Point[i].y<0)now+=pi;                    else if(Point[i].x>0&&Point[i].y<=0)now=2*pi-now;                }                drift=asin(d/temp);                //printf("*%lf %lf\n",now,drift);                Point[i].l=now-drift;                Point[i].r=now+drift;            }        }        if(n==0)        {            puts("0");            continue;        }        sort(Point,Point+n);        for(int i=n; i<2*n; i++)        {            Point[i]=Point[i-n];            Point[i].l+=2*pi;            Point[i].r+=2*pi;        }        ans=inf;        for(int i=0; i<n; i++)        {            r=Point[i].r;            cnt=1;            for(int j=i+1; j<n+i; j++)            {                 if(r>Point[j].r)r=Point[j].r;                else if(r<Point[j].l)                {                    cnt++;                    r=Point[j].r;                }            }            ans=min(ans,cnt);        }        printf("%d\n",ans);    }    return 0;}
                                                                                                                                                                                                 ^
0_0_20611383_12697.cpp:13:242: error: stray '#' in program
      0 ? (x) : -(x))#define clear1(A, X, SIZE) memset(A, X, sizeof(A[0]) * (SIZE))#define clearall(A, X) memset(A, X, sizeof(A))#define memcopy1(A , X, SIZE) memcp


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-06-17 10:31:06, Gzip enabled