0_0_20613351_8430.cpp:8:5: error: expected unqualified-id before numeric constant
1)sina=1; return neg*(asin(sina)-ang);}int main (){ int i; while(~scanf("%lf%lf%lf%lf%lf%d%d%d%d", &s.x, &s.y, &e.x, &e.y, &r, &n, &t1, &t2, &t)) { for(i=0; i<n; i++)scanf("%lf%lf", &po[i].x, &po[i].y); cen=cg(); double a2=(double)(t%t2)/t2*2*pi; for(i=0; i<n; i++)po[i]=pointrotate(cen, a2, po[i]); double a1=(double)(t%t1)/t1*2*pi; point newcen=pointrotate(e, a1, cen); point mov=newcen-cen; for(i=0; i<n; i++)po[i]=po[i]+mov; double se=dis(s, e); double maxang=acos(r/se); double maxarc=2*maxang*r; if(dot(s, newcen, e)<0) { printf("%.2lf\n", maxarc); continue; } double supang=pi*0.5-maxang; point up=po[0], lp=po[0]; for(int i=1; i<n; i++) { if(cross(up, po[i], s)>eps)up=po[i]; if(cross(lp, po[i], s)<-eps)lp=po[i]; } double ua=acos(dot(up, e, s)/(se*dis(s, up))); double la=acos(dot(lp, e, s)/(se*dis(s, lp))); if(cross(e, up, s)<0)ua=-ua; if(cross(e, lp, s)<0)la=-la; double cvua=min(supang, ua), cvla=max(-supang, la); if(cvua<cvla) { printf("%.2lf\n", maxarc); continue; } double coverarc=r*(coverdeg(cvua, se, r)-coverdeg(cvla, se, r)); printf("%.2lf\n", maxarc-coverarc); } return 0;}
^
0_0_20613351_8430.cpp:8:18: error: expected unqualified-id before 'return'
1)sina=1; return neg*(asin(sina)-ang);}int main (){ int i; while(~scanf("%lf%lf%lf%lf%lf%d%d%d%d", &s.x, &s.y, &e.x, &e.y, &r, &n, &t1, &t2, &t)) { for(i=0; i<n; i++)scanf("%lf%lf", &po[i].x, &po[i].y); cen=cg(); double a2=(double)(t%t2)/t2*2*pi; for(i=0; i<n; i++)po[i]=pointrotate(cen, a2, po[i]); double a1=(double)(t%t1)/t1*2*pi; point newcen=pointrotate(e, a1, cen); point mov=newcen-cen; for(i=0; i<n; i++)po[i]=po[i]+mov; double se=dis(s, e); double maxang=acos(r/se); double maxarc=2*maxang*r; if(dot(s, newcen, e)<0) { printf("%.2lf\n", maxarc); continue; } double supang=pi*0.5-maxang; point up=po[0], lp=po[0]; for(int i=1; i<n; i++) { if(cross(up, po[i], s)>eps)up=po[i]; if(cross(lp, po[i], s)<-eps)lp=po[i]; } double ua=acos(dot(up, e, s)/(se*dis(s, up))); double la=acos(dot(lp, e, s)/(se*dis(s, lp))); if(cross(e, up, s)<0)ua=-ua; if(cross(e, lp, s)<0)la=-la; double cvua=min(supang, ua), cvla=max(-supang, la); if(cvua<cvla) { printf("%.2lf\n", maxarc); continue; } double coverarc=r*(coverdeg(cvua, se, r)-coverdeg(cvla, se, r)); printf("%.2lf\n", maxarc-coverarc); } return 0;}
^
0_0_20613351_8430.cpp:8:46: error: expected declaration before '}' token
1)sina=1; return neg*(asin(sina)-ang);}int main (){ int i; while(~scanf("%lf%lf%lf%lf%lf%d%d%d%d", &s.x, &s.y, &e.x, &e.y, &r, &n, &t1, &t2, &t)) { for(i=0; i<n; i++)scanf("%lf%lf", &po[i].x, &po[i].y); cen=cg(); double a2=(double)(t%t2)/t2*2*pi; for(i=0; i<n; i++)po[i]=pointrotate(cen, a2, po[i]); double a1=(double)(t%t1)/t1*2*pi; point newcen=pointrotate(e, a1, cen); point mov=newcen-cen; for(i=0; i<n; i++)po[i]=po[i]+mov; double se=dis(s, e); double maxang=acos(r/se); double maxarc=2*maxang*r; if(dot(s, newcen, e)<0) { printf("%.2lf\n", maxarc); continue; } double supang=pi*0.5-maxang; point up=po[0], lp=po[0]; for(int i=1; i<n; i++) { if(cross(up, po[i], s)>eps)up=po[i]; if(cross(lp, po[i], s)<-eps)lp=po[i]; } double ua=acos(dot(up, e, s)/(se*dis(s, up))); double la=acos(dot(lp, e, s)/(se*dis(s, lp))); if(cross(e, up, s)<0)ua=-ua; if(cross(e, lp, s)<0)la=-la; double cvua=min(supang, ua), cvla=max(-supang, la); if(cvua<cvla) { printf("%.2lf\n", maxarc); continue; } double coverarc=r*(coverdeg(cvua, se, r)-coverdeg(cvla, se, r)); printf("%.2lf\n", maxarc-coverarc); } return 0;}
^
|