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_27725161_8011.cpp: In function 'int main()':
0_0_27725161_8011.cpp:6:11: error: expected '}' at end of input
 int main(){    //freopen("test.out","r",stdin);    int t,n,cas=1;    double R,x,y,r;    scanf("%d",&t);    while(t--&&scanf("%d%lf",&n,&R)!=EOF)    {        cnta=cntp=0;        for(int i=0;i<n;i++)        {            scanf("%lf%lf%lf",&x,&y,&r);            double dis=get_distance(x,y,0,0);            if(dis>=r+R)                continue;            if(r<R&&dis<R-r)                continue;            double tp_theta,theta1l,theta1r,theta2l,theta2r;            tp_theta=acos(x/sqrt(x*x+y*y));            if(y>0)                tp_theta=2*pi-tp_theta;            theta1l=acos((R*R-r*r-x*x-y*y)/2/r/sqrt(x*x+y*y));            theta1r=2*pi-theta1l-tp_theta;            theta1l-=tp_theta;            if(theta1r<0)                theta1r+=2*pi;            if(theta1l<0)                theta1l+=2*pi;            if(theta1l>theta1r)                swap(theta1l,theta1r);            theta2l=acos((R*R-r*r+x*x+y*y)/2/R/sqrt(x*x+y*y));            theta2r=2*pi-theta2l-tp_theta;            theta2l-=tp_theta;            if(theta2r<0)                theta2r+=2*pi;            if(theta2l<0)                theta2l+=2*pi;            if(theta2l>theta2r)                swap(theta2l,theta2r);            tp_theta=(theta1l+theta1r)/2;            if(get_distance(x+r*cos(tp_theta),y+r*sin(tp_theta),0,0)<R)                p[cntp++]=node1{x,y,r,theta1l,theta1r};            else                p[cntp++]=node1{x,y,r,theta1r,theta1l};            tp_theta=(theta2l+theta2r)/2;            if(get_distance(R*cos(tp_theta),R*sin(tp_theta),x,y)<r)                a[cnta++]=node2{theta2l,theta2r};            else                a[cnta++]=node2{theta2r-2*pi,theta2l};        }        sort(a,a+cnta,cmp);        for(int i=1;i<cnta;i++)            p[cntp++]=node1{0,0,R,a[i-1].thetat,a[i].thetas};        if(cnta)            p[cntp++]=node1{0,0,R,a[cnta-1].thetat,a[0].thetas>=0?a[0].thetas:a[0].thetas+2*pi};        else            p[cntp++]=node1{0,0,R,0,pi*2};        double ans=0;        for(int i=0;i<cntp;i++)            for(int j=0;j<=i;j++)                ans=max(ans,cal(p[i],p[j]));        printf("Case #%d: %.9f\n",cas++,ans);    }    return 0;}
           ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-01-10 12:37:54, Gzip enabled