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_24702444_28338.cpp:7:1: error: stray '\241' in program
 struct point{double x,y;double A;double r;};point p[100];int N;bool map[100][100];char str[1000000];inline void getNum(int &i,double &x,int len){x = 0;while((str[i]==¡¯ ¡®||str[i]==¡¯\n¡¯)&&i<len) i++;while(str[i]>=¡¯0¡ä&&str[i]<=¡¯9¡ä&&i<len){x = x*10 + str[i] ? ¡¯0¡ä;i ++ ;}return;}bool readIn(){if(gets(str)==NULL)return false;int len = strlen(str);int i , j;N = 1;for(i=0;i<len;){getNum(i,p[N].x,len);N++;    }gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].y,len);j++;}gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].A,len);p[j].A*=1000.0;j++;}gets(str);N?;return true;}double dis(point a,point b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}bool can_reach[110];void dfs(int x){can_reach[x] = true;for(int i=1;i<=N+1&&!can_reach[N+1];i++){if(map[x][i]&&!can_reach[i]){dfs(i);    }}return;}bool check(double mid){int S = 0 , T = N + 1;point s , t;s.x = 50 , s.y = 0;t.x = 50 , t.y = 100;for(int i=1;i<=N;i++){p[i].r = sqrt(p[i].A/mid);double d = dis(p[i],s);if(d<p[i].r) return false;d = dis(p[i],t);if(d<p[i].r) return false;}memset(map,false,sizeof(map));for(int i=1;i<=N;i++){if(p[i].x<=p[i].r) map[S][i] = true;if(p[i].x+p[i].r>=100.0) map[i][T] = true;if(p[i].y<=p[i].r){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}if(p[i].y+p[i].r>=100.0){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}}for(int i=1;i<=N;i++){for(int j=i+1;j<=N;j++){if(dis(p[i],p[j])<p[i].r+p[j].r){map[i][j]=map[j][i]=true;    }}    }memset(can_reach,false,sizeof(can_reach));dfs(S);return !can_reach[T];}double Solve(){double ans = 0 , l = 0 , r = 1e15 , mid;while(r ? l >= eps){mid  = (l + r) / 2.0;if(check(mid))    r = mid , ans = mid;else l = mid;}return ans;}int main(){while(readIn()){printf("%.3lf\n",Solve());}}
 ^
0_0_24702444_28338.cpp:7:1: error: stray '\257' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\256' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\257' in program
0_0_24702444_28338.cpp:7:1: error: stray '\' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\257' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\257' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\344' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\257' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\344' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\257' in program
0_0_24702444_28338.cpp:7:1: error: stray '\241' in program
0_0_24702444_28338.cpp:7:1: error: stray '\344' in program
0_0_24702444_28338.cpp: In function 'void getNum(int&, double&, int)':
0_0_24702444_28338.cpp:7:172: error: expected primary-expression before '||' token
 struct point{double x,y;double A;double r;};point p[100];int N;bool map[100][100];char str[1000000];inline void getNum(int &i,double &x,int len){x = 0;while((str[i]==¡¯ ¡®||str[i]==¡¯\n¡¯)&&i<len) i++;while(str[i]>=¡¯0¡ä&&str[i]<=¡¯9¡ä&&i<len){x = x*10 + str[i] ? ¡¯0¡ä;i ++ ;}return;}bool readIn(){if(gets(str)==NULL)return false;int len = strlen(str);int i , j;N = 1;for(i=0;i<len;){getNum(i,p[N].x,len);N++;    }gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].y,len);j++;}gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].A,len);p[j].A*=1000.0;j++;}gets(str);N?;return true;}double dis(point a,point b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}bool can_reach[110];void dfs(int x){can_reach[x] = true;for(int i=1;i<=N+1&&!can_reach[N+1];i++){if(map[x][i]&&!can_reach[i]){dfs(i);    }}return;}bool check(double mid){int S = 0 , T = N + 1;point s , t;s.x = 50 , s.y = 0;t.x = 50 , t.y = 100;for(int i=1;i<=N;i++){p[i].r = sqrt(p[i].A/mid);double d = dis(p[i],s);if(d<p[i].r) return false;d = dis(p[i],t);if(d<p[i].r) return false;}memset(map,false,sizeof(map));for(int i=1;i<=N;i++){if(p[i].x<=p[i].r) map[S][i] = true;if(p[i].x+p[i].r>=100.0) map[i][T] = true;if(p[i].y<=p[i].r){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}if(p[i].y+p[i].r>=100.0){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}}for(int i=1;i<=N;i++){for(int j=i+1;j<=N;j++){if(dis(p[i],p[j])<p[i].r+p[j].r){map[i][j]=map[j][i]=true;    }}    }memset(can_reach,false,sizeof(can_reach));dfs(S);return !can_reach[T];}double Solve(){double ans = 0 , l = 0 , r = 1e15 , mid;while(r ? l >= eps){mid  = (l + r) / 2.0;if(check(mid))    r = mid , ans = mid;else l = mid;}return ans;}int main(){while(readIn()){printf("%.3lf\n",Solve());}}
                                                                                                                                                                            ^
0_0_24702444_28338.cpp:7:185: error: 'n' was not declared in this scope
 struct point{double x,y;double A;double r;};point p[100];int N;bool map[100][100];char str[1000000];inline void getNum(int &i,double &x,int len){x = 0;while((str[i]==¡¯ ¡®||str[i]==¡¯\n¡¯)&&i<len) i++;while(str[i]>=¡¯0¡ä&&str[i]<=¡¯9¡ä&&i<len){x = x*10 + str[i] ? ¡¯0¡ä;i ++ ;}return;}bool readIn(){if(gets(str)==NULL)return false;int len = strlen(str);int i , j;N = 1;for(i=0;i<len;){getNum(i,p[N].x,len);N++;    }gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].y,len);j++;}gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].A,len);p[j].A*=1000.0;j++;}gets(str);N?;return true;}double dis(point a,point b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}bool can_reach[110];void dfs(int x){can_reach[x] = true;for(int i=1;i<=N+1&&!can_reach[N+1];i++){if(map[x][i]&&!can_reach[i]){dfs(i);    }}return;}bool check(double mid){int S = 0 , T = N + 1;point s , t;s.x = 50 , s.y = 0;t.x = 50 , t.y = 100;for(int i=1;i<=N;i++){p[i].r = sqrt(p[i].A/mid);double d = dis(p[i],s);if(d<p[i].r) return false;d = dis(p[i],t);if(d<p[i].r) return false;}memset(map,false,sizeof(map));for(int i=1;i<=N;i++){if(p[i].x<=p[i].r) map[S][i] = true;if(p[i].x+p[i].r>=100.0) map[i][T] = true;if(p[i].y<=p[i].r){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}if(p[i].y+p[i].r>=100.0){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}}for(int i=1;i<=N;i++){for(int j=i+1;j<=N;j++){if(dis(p[i],p[j])<p[i].r+p[j].r){map[i][j]=map[j][i]=true;    }}    }memset(can_reach,false,sizeof(can_reach));dfs(S);return !can_reach[T];}double Solve(){double ans = 0 , l = 0 , r = 1e15 , mid;while(r ? l >= eps){mid  = (l + r) / 2.0;if(check(mid))    r = mid , ans = mid;else l = mid;}return ans;}int main(){while(readIn()){printf("%.3lf\n",Solve());}}
                                                                                                                                                                                         ^
0_0_24702444_28338.cpp:7:270: error: expected ':' before ';' token
 struct point{double x,y;double A;double r;};point p[100];int N;bool map[100][100];char str[1000000];inline void getNum(int &i,double &x,int len){x = 0;while((str[i]==¡¯ ¡®||str[i]==¡¯\n¡¯)&&i<len) i++;while(str[i]>=¡¯0¡ä&&str[i]<=¡¯9¡ä&&i<len){x = x*10 + str[i] ? ¡¯0¡ä;i ++ ;}return;}bool readIn(){if(gets(str)==NULL)return false;int len = strlen(str);int i , j;N = 1;for(i=0;i<len;){getNum(i,p[N].x,len);N++;    }gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].y,len);j++;}gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].A,len);p[j].A*=1000.0;j++;}gets(str);N?;return true;}double dis(point a,point b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}bool can_reach[110];void dfs(int x){can_reach[x] = true;for(int i=1;i<=N+1&&!can_reach[N+1];i++){if(map[x][i]&&!can_reach[i]){dfs(i);    }}return;}bool check(double mid){int S = 0 , T = N + 1;point s , t;s.x = 50 , s.y = 0;t.x = 50 , t.y = 100;for(int i=1;i<=N;i++){p[i].r = sqrt(p[i].A/mid);double d = dis(p[i],s);if(d<p[i].r) return false;d = dis(p[i],t);if(d<p[i].r) return false;}memset(map,false,sizeof(map));for(int i=1;i<=N;i++){if(p[i].x<=p[i].r) map[S][i] = true;if(p[i].x+p[i].r>=100.0) map[i][T] = true;if(p[i].y<=p[i].r){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}if(p[i].y+p[i].r>=100.0){if(p[i].x<=50) map[S][i] = true;if(p[i].x>=50) map[i][T] = true;}}for(int i=1;i<=N;i++){for(int j=i+1;j<=N;j++){if(dis(p[i],p[j])<p[i].r+p[j].r){map[i][j]=map[j][i]=true;    }}    }memset(can_reach,false,sizeof(can_reach));dfs(S);return !can_reach[T];}double Solve(){double ans = 0 , l = 0 , r = 1e15 , mid;while(r ? l >= eps){mid  = (l + r) / 2.0;if(check(mid))    r = mid , ans = mid;else l = mid;}return ans;}int main(){while(readIn()){printf("%.3lf\n",Solve());}}
                                                                                                                                                                                                                                                                              ^
0_0_24702444_28338.cpp:7:270: error: expected primary-expression before ';' token
0_0_24702444_28338.cpp: In function 'bool readIn()':
0_0_24702444_28338.cpp:7:591: error: expected primary-expression before ';' token
 struct point{double x,y;double A;double r;};point p[100];int N;bool map[100][100];char str[1000000];inline void getNum(int &i,double &x,int len){x = 0;while((str[i]==¡¯ ¡®||str[i]==¡¯\n¡¯)&&i<len) i++;while(str[i]>=¡¯0¡ä&&str[i]<=¡¯9¡ä&&i<len){x = x*10 + str[i] ? ¡¯0¡ä;i ++ ;}return;}bool readIn(){if(gets(str)==NULL)return false;int len = strlen(str);int i , j;N = 1;for(i=0;i<len;){getNum(i,p[N].x,len);N++;    }gets(str);len = strlen(str);for(i=0,j=1;i<len;){getNum(i,p[j].y,len);j


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.000000(s) query 1, Server time : 2025-01-07 04:48:47, Gzip enabled