foo.cpp:4:750: error: stray '#' in program
using namespace std;const int MAXN=2000+9, MAXP=MAXN*2;const double fINF=1e9;struct point{ int x,y; point() {} point(int _x, int _y) : x(_x), y(_y) {}}p[MAXP];int det(const point &o, const point &a, const point &b){ return (a.x-o.x)*(b.y-o.y)-(b.x-o.x)*(a.y-o.y);}point low,high;double d[MAXP];void go(int a,int b){ if(det(p[a],low,p[b])>=0 && det(p[a],high,p[b])<=0) d[b]=min(d[b],d[a]+hypot(p[a].x-p[b].x, p[a].y-p[b].y));}int bound;void update(int u,int i){ low=point(p[u].x,p[u].y-1); high=point(p[u].x, p[u].y+1); for(;i<bound;++i) { go(u,i+i); if(det(p[u],low,p[i+i])>0) low=p[i+i]; go(u,i+i+1); if(det(p[u],high,p[i+i+1])<0) high=p[i+i+1]; if(det(p[u],low,high)<0) return; } go(u,1);}int x1[MAXN], yy1[MAXN], yy2[MAXN];int main(){#ifndef ONLINE_JUDGE freopen("car.in","r",stdin); freopen("car.out","w",stdout);#endif int n,i; scanf("%d",&n); for(i=0;i<n;++i) scanf("%d%d%*d%d",x1+i,yy1+i,yy2+i); scanf("%d%d%d%d",&p[0].x,&p[0].y,&p[1].x,&p[1].y); if(p[0].x>p[1].x) swap(p[0],p[1]); int np=2; for(i=1;i<n;++i) { p[np++]=point(x1[i], max(yy1[i-1],yy1[i])); p[np++]=point(x1[i], min(yy2[i-1],yy2[i])); } for(i=1;i<np;++i) d[i]=fINF; bound=upper_bound(x1,x1+n,p[1].x)-x1; update(0, upper_bound(x1,x1+n,p[0].x)-x1); for(i=2;i<np && p[i].x<=p[1].x;++i) if(p[i].x>p[0].x) update(i, i/2); double v; scanf("%lf",&v); printf("%.10lf\n",d[1]/v); return 0;}
^
foo.cpp:4:830: error: stray '#' in program
using namespace std;const int MAXN=2000+9, MAXP=MAXN*2;const double fINF=1e9;struct point{ int x,y; point() {} point(int _x, int _y) : x(_x), y(_y) {}}p[MAXP];int det(const point &o, const point &a, const point &b){ return (a.x-o.x)*(b.y-o.y)-(b.x-o.x)*(a.y-o.y);}point low,high;double d[MAXP];void go(int a,int b){ if(det(p[a],low,p[b])>=0 && det(p[a],high,p[b])<=0) d[b]=min(d[b],d[a]+hypot(p[a].x-p[b].x, p[a].y-p[b].y));}int bound;void update(int u,int i){ low=point(p[u].x,p[u].y-1); high=point(p[u].x, p[u].y+1); for(;i<bound;++i) { go(u,i+i); if(det(p[u],low,p[i+i])>0) low=p[i+i]; go(u,i+i+1); if(det(p[u],high,p[i+i+1])<0) high=p[i+i+1]; if(det(p[u],low,high)<0) return; } go(u,1);}int x1[MAXN], yy1[MAXN], yy2[MAXN];int main(){#ifndef ONLINE_JUDGE freopen("car.in","r",stdin); freopen("car.out","w",stdout);#endif int n,i; scanf("%d",&n); for(i=0;i<n;++i) scanf("%d%d%*d%d",x1+i,yy1+i,yy2+i); scanf("%d%d%d%d",&p[0].x,&p[0].y,&p[1].x,&p[1].y); if(p[0].x>p[1].x) swap(p[0],p[1]); int np=2; for(i=1;i<n;++i) { p[np++]=point(x1[i], max(yy1[i-1],yy1[i])); p[np++]=point(x1[i], min(yy2[i-1],yy2[i])); } for(i=1;i<np;++i) d[i]=fINF; bound=upper_bound(x1,x1+n,p[1].x)-x1; update(0, upper_bound(x1,x1+n,p[0].x)-x1); for(i=2;i<np && p[i].x<=p[1].x;++i) if(p[i].x>p[0].x) update(i, i/2); double v; scanf("%lf",&v); printf("%.10lf\n",d[1]/v); return 0;}