0_0_15373074_31056.cpp: In function 'int main()':
0_0_15373074_31056.cpp:10:639: error: 'f' was not declared in this scope
int main(){ int T; scanf("%d", &T); while(T--){ int n; scanf("%d", &n); for(int i = 0; i<n; i++) scanf("%d%d", x+i, y+i); x[n] = x[0]; y[n] = y[0]; for(int i = 0; i<n; i++) d[i] = sqrt((x[i+1] - x[i]) * (x[i+1] - x[i]) + (y[i+1] - y[i]) * (y[i+1] - y[i] )) + eps; if(n&1){ double acc = 0; for(int i = 0; i<n; i++) acc += (i&1) ? -d[i] : d[i]; r[0] = acc / 2.0; int i;for(i = 1; i<n ; i++){ r[i] = d[i-1] - r[i-1]; if(r[i]<-eps) { puts("IMPOSSIBLE"); break; } } if(i<n) continue; double ans = 0.0; for(int i = 0 ; i<n; i++) ans += r[i] * r[i]; out(ans * pi); for(int i = 0; i<n; i++) out(r[i]); }else{ int acc = 0, Min = 0, Max = INT_MAX; f or(int i = 0; i<n; i++){ acc += (i&1) ? -d[i] : d[i]; if(i&1) Min = max(Min, acc); else Max = min(Max, acc); } if(Min > Max) { p uts("IMPOSSIBLE"); continue; } double tmp = 0; for(int i = 0; i<n; i++) tmp += ((i&1) ? (i-n) : (n-i)) * d[i]; r[0] = tmp / (dou ble)n; r[0] = min(Max+0.0, r[0]); r[0] = max(Min+0.0, r[0]); for(int i = 1; i<n; i++) r[i] = d[i-1] - r[i-1]; if(fabs(d[n-1]-r [n-1]-r[0])>eps) { puts("IMPOSSIBLE");continue;} double ans = 0.0; for(int i = 0; i<n; i++) ans += r[i] * r[i]; out(ans * pi); f or(int i = 0; i<n; i++) out(r[i]); } } return 0;}
^
0_0_15373074_31056.cpp:10:644: error: expected primary-expression before 'int'
int main(){ int T; scanf("%d", &T); while(T--){ int n; scanf("%d", &n); for(int i = 0; i<n; i++) scanf("%d%d", x+i, y+i); x[n] = x[0]; y[n] = y[0]; for(int i = 0; i<n; i++) d[i] = sqrt((x[i+1] - x[i]) * (x[i+1] - x[i]) + (y[i+1] - y[i]) * (y[i+1] - y[i] )) + eps; if(n&1){ double acc = 0; for(int i = 0; i<n; i++) acc += (i&1) ? -d[i] : d[i]; r[0] = acc / 2.0; int i;for(i = 1; i<n ; i++){ r[i] = d[i-1] - r[i-1]; if(r[i]<-eps) { puts("IMPOSSIBLE"); break; } } if(i<n) continue; double ans = 0.0; for(int i = 0 ; i<n; i++) ans += r[i] * r[i]; out(ans * pi); for(int i = 0; i<n; i++) out(r[i]); }else{ int acc = 0, Min = 0, Max = INT_MAX; f or(int i = 0; i<n; i++){ acc += (i&1) ? -d[i] : d[i]; if(i&1) Min = max(Min, acc); else Max = min(Max, acc); } if(Min > Max) { p uts("IMPOSSIBLE"); continue; } double tmp = 0; for(int i = 0; i<n; i++) tmp += ((i&1) ? (i-n) : (n-i)) * d[i]; r[0] = tmp / (dou ble)n; r[0] = min(Max+0.0, r[0]); r[0] = max(Min+0.0, r[0]); for(int i = 1; i<n; i++) r[i] = d[i-1] - r[i-1]; if(fabs(d[n-1]-r [n-1]-r[0])>eps) { puts("IMPOSSIBLE");continue;} double ans = 0.0; for(int i = 0; i<n; i++) ans += r[i] * r[i]; out(ans * pi); f or(int i = 0; i<n; i++) out(r[i]); } } return 0;}
^
0_0_15373074_31056.cpp:10:644: error: expected ')' before 'int'
0_0_15373074_31056.cpp:10:655: error: 'i' was not declared in this scope
int main(){ int T; scanf("%d", &T); while(T--){ int n; scanf("%d", &n); for(int i = 0; i<n; i++) scanf("%d%d", x+i, y+i); x[n] = x[0]; y[n] = y[0]; for(int i = 0; i<n; i++) d[i] = sqrt((x[i+1] - x[i]) * (x[i+1] - x[i]) + (y[i+1] - y[i]) * (y[i+1] - y[i] )) + eps; if(n&1){ double acc = 0; for(int i = 0; i<n; i++) acc += (i&1) ? -d[i] : d[i]; r[0] = acc / 2.0; int i;for(i = 1; i<n ; i++){ r[i] = d[i-1] - r[i-1]; if(r[i]<-eps) { puts("IMPOSSIBLE"); break; } } if(i<n) continue; double ans = 0.0; for(int i = 0 ; i<n; i++) ans += r[i] * r[i]; out(ans * pi); for(int i = 0; i<n; i++) out(r[i]); }else{ int acc = 0, Min = 0, Max = INT_MAX; f or(int i = 0; i<n; i++){ acc += (i&1) ? -d[i] : d[i]; if(i&1) Min = max(Min, acc); else Max = min(Max, acc); } if(Min > Max) { p uts("IMPOSSIBLE"); continue; } double tmp = 0; for(int i = 0; i<n; i++) tmp += ((i&1) ? (i-n) : (n-i)) * d[i]; r[0] = tmp / (dou ble)n; r[0] = min(Max+0.0, r[0]); r[0] = max(Min+0.0, r[0]); for(int i = 1; i<n; i++) r[i] = d[i-1] - r[i-1]; if(fabs(d[n-1]-r [n-1]-r[0])>eps) { puts("IMPOSSIBLE");continue;} double ans = 0.0; for(int i = 0; i<n; i++) ans += r[i] * r[i]; out(ans * pi); f or(int i = 0; i<n; i++) out(r[i]); } } return 0;}
^
0_0_15373074_31056.cpp:10:768: error: 'p' was not declared in this scope
int main(){ int T; scanf("%d", &T); while(T--){ int n; scanf("%d", &n); for(int i = 0; i<n; i++) scanf("%d%d", x+i, y+i); x[n] = x[0]; y[n] = y[0]; for(int i = 0; i<n; i++) d[i] = sqrt((x[i+1] - x[i]) * (x[i+1] - x[i]) + (y[i+1] - y[i]) * (y[i+1] - y[i] )) + eps; if(n&1){ double acc = 0; for(int i = 0; i<n; i++) acc += (i&1) ? -d[i] : d[i]; r[0] = acc / 2.0; int i;for(i = 1; i<n ; i++){ r[i] = d[i-1] - r[i-1]; if(r[i]<-eps) { puts("IMPOSSIBLE"); break; } } if(i<n) continue; double ans = 0.0; for(int i = 0 ; i<n; i++) ans += r[i] * r[i]; out(ans * pi); for(int i = 0; i<n; i++) out(r[i]); }else{ int acc = 0, Min = 0, Max = INT_MAX; f or(int i = 0; i<n; i++){ acc += (i&1) ? -d[i] : d[i]; if(i&1) Min = max(Min, acc); else Max = min(Max, acc); } if(Min > Max) { p uts("IMPOSSIBLE"); continue; } double tmp = 0; for(int i = 0; i<n; i++) tmp += ((i&1) ? (i-n) : (n-i)) * d[i]; r[0] = tmp / (dou ble)n; r[0] = min(Max+0.0, r[0]); r[0] = max(Min+0.0, r[0]); for(int i = 1; i<n; i++) r[i] = d[i-1] - r[i-1]; if(fabs(d[n-1]-r [n-1]-r[0])>eps) { puts("IMPOSSIBLE");continue;} double ans = 0.0; for(int i = 0; i<n; i++) ans += r[i] * r[i]; out(ans * pi); f or(int i = 0; i<n; i++) out(r[i]); } } return 0;}
^
0_0_15373074_31056.cpp:10:895: error: 'dou' was not declared in this scope
int main(){ int T; scanf("%d", &T); while(T--){ int n; scanf("%d", &n); for(int i = 0; i<n; i++) scanf("%d%d", x+i, y+i); x[n] = x[0]; y[n] = y[0]; for(int i = 0; i<n; i++) d[i] = sqrt((x[i+1] - x[i]) * (x[i+1] - x[i]) + (y[i+1] - y[i]) * (y[i+1] - y[i] )) + eps; if(n&1){ double acc = 0; for(int i = 0; i<n; i++) acc += (i&1) ? -d[i] : d[i]; r[0] = acc / 2.0; int i;for(i = 1; i<n ; i++){ r[i] = d[i-1] - r[i-1]; if(r[i]<-eps) { puts("IMPOSSIBLE"); break; } } if(i<n) continue; double ans = 0.0; for(int i = 0 ; i<n; i++) ans += r[i] * r[i]; out(ans * pi); for(int i = 0; i<n; i++) out(r[i]); }else{ int acc = 0, Min = 0, Max = INT_MAX; f or(int i = 0; i<n; i++){ acc += (i&1) ? -d[i] : d[i]; if(i&1) Min = max(Min, acc); else Max = min(Max, acc); } if(Min > Max) { p uts("IMPOSSIBLE"); continue; } double tmp = 0; for(int i = 0; i<n; i++) tmp += ((i&1) ? (i-n) : (n-i)) * d[i]; r[0] = tmp / (dou ble)n; r[0] = min(Max+0.0, r[0]); r[0] = max(Min+0.0, r[0]); for(int i = 1; i<n; i++) r[i] = d[i-1] - r[i-1]; if(fabs(d[n-1]-r [n-1]-r[0])>eps) { puts("IMPOSSIBLE");continue;} double ans = 0.0; for(int i = 0; i<n; i++) ans += r[i] * r[i]; out(ans * pi); f or(int i = 0; i<n; i++) out(r[i]); } } return 0;}
^
0_0_15373074_31056.cpp:10:899: error
|