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_19221970_7944.cpp: In function 'bool check(double, double)':
0_0_19221970_7944.cpp:21:22: error: expected ';' before 'int'
 #define PI acos(-1.0)int n,m,tot; 
                      ^
0_0_19221970_7944.cpp:44:39: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                       ^
0_0_19221970_7944.cpp:21:22: error: expected ';' before 'int'
 #define PI acos(-1.0)int n,m,tot; 
                      ^
0_0_19221970_7944.cpp:44:58: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                                          ^
0_0_19221970_7944.cpp:21:26: error: redeclaration of 'int n'
 #define PI acos(-1.0)int n,m,tot; 
                          ^
0_0_19221970_7944.cpp:44:58: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                                          ^
0_0_19221970_7944.cpp:21:26: note: 'int n' previously declared here
 #define PI acos(-1.0)int n,m,tot; 
                          ^
0_0_19221970_7944.cpp:44:39: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                       ^
0_0_19221970_7944.cpp:21:28: error: redeclaration of 'int m'
 #define PI acos(-1.0)int n,m,tot; 
                            ^
0_0_19221970_7944.cpp:44:58: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                                          ^
0_0_19221970_7944.cpp:21:28: note: 'int m' previously declared here
 #define PI acos(-1.0)int n,m,tot; 
                            ^
0_0_19221970_7944.cpp:44:39: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                       ^
0_0_19221970_7944.cpp:21:30: error: redeclaration of 'int tot'
 #define PI acos(-1.0)int n,m,tot; 
                              ^
0_0_19221970_7944.cpp:44:58: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                                          ^
0_0_19221970_7944.cpp:21:30: note: 'int tot' previously declared here
 #define PI acos(-1.0)int n,m,tot; 
                              ^
0_0_19221970_7944.cpp:44:39: note: in expansion of macro 'PI'
 double b){ if(b>a+eps) return b+eps<a+PI; return b+eps<a-PI;} 
                                       ^
0_0_19221970_7944.cpp: In function 'int search(std::vector<Edge>&, double)':
0_0_19221970_7944.cpp:21:22: error: expected ',' or ';' before 'int'
 #define PI acos(-1.0)int n,m,tot; 
                      ^
0_0_19221970_7944.cpp:47:12: note: in expansion of macro 'PI'
 double d=w+PI; if(d>PI+eps) d-=2*PI; 
            ^
0_0_19221970_7944.cpp:21:22: error: expected ')' before 'int'
 #define PI acos(-1.0)int n,m,tot; 
                      ^
0_0_19221970_7944.cpp:47:21: note: in expansion of macro 'PI'
 double d=w+PI; if(d>PI+eps) d-=2*PI; 
                     ^
0_0_19221970_7944.cpp:47:27: error: expected ';' before ')' token
 double d=w+PI; if(d>PI+eps) d-=2*PI; 
                           ^
0_0_19221970_7944.cpp: In function 'void init()':
0_0_19221970_7944.cpp:58:20: error: 'n' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                    ^
0_0_19221970_7944.cpp:58:99: error: 'n' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                                                                                                   ^
0_0_19221970_7944.cpp:58:149: error: 'n' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                                                                                                                                                     ^
0_0_19221970_7944.cpp:58:155: error: 'm' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                                                                                                                                                           ^
0_0_19221970_7944.cpp:58:254: error: 'n' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                                                                                                                                                                                                                                                              ^
0_0_19221970_7944.cpp:58:256: error: 'm' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                                                                                                                                                                                                                                                                ^
0_0_19221970_7944.cpp:58:432: error: 'tot' was not declared in this scope
 int i,j; for(i=0;i<n;i++) scanf("%lf %lf",&pts[i].x,&pts[i].y); g.clear(); vp.clear(); for(i=1;i<=n;i++) lines[i-1]=Line(pts[i%n],pts[i-1]);  for(i=n;i<n+m;i++) scanf("%lf %lf %lf %lf",&lines[i].a.x,&lines[i].a.y,&lines[i].b.x,&lines[i].b.y); for(i=0;i<n+m;i++) { p[i].clear(); for(j=0;j<i;j++) { if(parallel(lines[i],lines[j])) continue; Point pt=intesection(lines[i],lines[j]); g[pt]; p[i].push_back(pt); p[j].push_back(pt); } } tot=0; for(map<Point,int>::iterator it=g.begin();it!=g.end();it++) { vp.push_back(it->first); it->second=tot; E[tot++].clear(); } for(i=0;i<n+m;i++) { if(p[i].size()<2) continue; sort(p[i].begin(),p[i].end()); p[i].erase(unique(p[i].begin(),p[i].end()),p[i].end()); 
                                                                                                                                                                                                                                                                                                                 


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-30 17:33:00, Gzip enabled