QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#299109 | #7903. Computational Intelligence | ucup-team087# | WA | 1432ms | 4056kb | C++14 | 7.7kb | 2024-01-06 17:14:04 | 2024-01-06 17:14:05 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
using Double = double;
constexpr Double EPS = 1e-12;
inline int sig(Double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
inline Double sq(Double r) { return r * r; }
struct Pt {
Double x, y;
Pt() {}
Pt(Double x_, Double y_) : x(x_), y(y_) {}
Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); }
Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); }
Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); }
Pt operator/(const Pt &a) const { const Double d2 = a.abs2(); return Pt((x * a.x + y * a.y) / d2, (y * a.x - x * a.y) / d2); }
Pt operator+() const { return Pt(+x, +y); }
Pt operator-() const { return Pt(-x, -y); }
Pt operator*(const Double &k) const { return Pt(x * k, y * k); }
Pt operator/(const Double &k) const { return Pt(x / k, y / k); }
friend Pt operator*(const Double &k, const Pt &a) { return Pt(k * a.x, k * a.y); }
Pt &operator+=(const Pt &a) { x += a.x; y += a.y; return *this; }
Pt &operator-=(const Pt &a) { x -= a.x; y -= a.y; return *this; }
Pt &operator*=(const Pt &a) { return *this = *this * a; }
Pt &operator/=(const Pt &a) { return *this = *this / a; }
Pt &operator*=(const Double &k) { x *= k; y *= k; return *this; }
Pt &operator/=(const Double &k) { x /= k; y /= k; return *this; }
Double abs() const { return sqrt(x * x + y * y); }
Double abs2() const { return x * x + y * y; }
Double arg() const { return atan2(y, x); }
Double dot(const Pt &a) const { return x * a.x + y * a.y; }
Double det(const Pt &a) const { return x * a.y - y * a.x; }
friend ostream &operator<<(ostream &os, const Pt &a) { os << "(" << a.x << ", " << a.y << ")"; return os; }
};
inline Double tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); }
int iSP(const Pt &a, const Pt &b, const Pt &c) {
int s = sig((b - a).det(c - a));
if (s != 0) return s;
if (sig((b - a).dot(c - a)) < 0) return -2; // c-a-b
if (sig((a - b).dot(c - b)) < 0) return +2; // a-b-c
return 0;
}
int iLL(const Pt &a, const Pt &b, const Pt &c, const Pt &d) {
if (sig((b - a).det(d - c))) return 1; // intersect
if (sig((b - a).det(c - a))) return 0; // parallel
return -1; // correspond
}
Pt pLL(const Pt &a, const Pt &b, const Pt &c, const Pt &d) {
const Pt ab = b - a, cd = d - c;
return a + ab * (c - a).det(cd) / ab.det(cd);
}
Double pLL2(const Pt &a, const Pt &b, const Pt &c, const Pt &d) {
const Pt ab = b - a, cd = d - c;
return (c - a).det(cd) / ab.det(cd);
}
constexpr int N = 300;
constexpr int M = 50;
int main() {
for (int numCases; ~scanf("%d", &numCases); ) { for (int caseId = 1; caseId <= numCases; ++caseId) {
Double X[4][2];
for (int i = 0; i < 4; ++i) for (int j = 0; j < 2; ++j) {
int x;
scanf("%d", &x);
X[i][j] = x;
}
// kouten
Pt P[4];
for (int i = 0; i < 4; ++i) P[i] = Pt(X[i][0], X[i][1]);
if ((P[1] - P[0]).abs2() > (P[3] - P[2]).abs2()) {
for (int j = 0; j < 2; ++j) swap(X[0][j], X[2][j]);
for (int j = 0; j < 2; ++j) swap(X[1][j], X[3][j]);
swap(P[0], P[2]);
swap(P[1], P[3]);
}
int I0 = -1;
if (iLL(P[0], P[1], P[2], P[3]) == 1) {
const Double s = pLL2(
Pt(X[0][0], X[0][1]),
Pt(X[1][0], X[1][1]),
Pt(X[2][0], X[2][1]),
Pt(X[3][0], X[3][1])
);
if (0 <= s && s <= 1) {
I0 = min(max((int)(s * N), 0), N - 1);
// printf("kouten s = %f, I0 = %d\n",s,I0);
}
}
for (int j = 0; j < 2; ++j) X[1][j] -= X[0][j];
for (int j = 0; j < 2; ++j) X[3][j] -= X[2][j];
Double a = 0.0;
for (int j = 0; j < 2; ++j) {
a += X[3][j]*X[3][j];
}
const Double sa = sqrt(a);
auto calc = [&](Double s) -> Double {
Double /*a = 0.0, */b = 0.0, c = 0.0;
for (int j = 0; j < 2; ++j) {
// ((X[2][j] + X[3][j] t) - (X[0][j] + X[1][j] s))^2
const Double f = X[3][j];
const Double g = X[2][j] - (X[0][j] + X[1][j] * s);
// a += f*f;
b += 2*f*g;
c += g*g;
}
const Double l = b / (2*a);
const Double r = l + 1;
// const Double sa = sqrt(a);
const Double d = (c - b*b / (4*a)) / a;
if (d <= EPS) {
// if (d <= 0) {
// auto sub = [&](Double u) -> Double {
// return sa * u*u/2;
// };
if (0 <= l) {
// return sub(r) - sub(l);
return sa/2 * (r*r - l*l);
} else if (r <= 0) {
// return sub(l) - sub(r);
return sa/2 * (l*l - r*r);
} else {
// return sub(l) + sub(r)/* - 2 * sub(0)*/;
return sa/2 * (l*l + r*r);
}
} else {
// auto sub = [&](Double u) -> Double {
// const Double su = sqrt(u*u + d);
// return sa * (u * su - d * log(su - u)) / 2;
// };
// return sub(r) - sub(l);
const Double sl = sqrt(l*l + d);
const Double sr = sqrt(r*r + d);
return sa/2 * ((r*sr - l*sl) - d * log((sr - r) / (sl - l)));
// return sa/2 * ((r*sr - l*sl) - d * log((sl + l) / (sr + r)));
}
};
// [l/N, r/N]
auto easy = [&](int l, int r) -> Double {
if (l == r) return 0.0;
Double ret = 0.0;
for (int i = 2*l; i <= 2*r; ++i) {
const int coef = (i == 2*l || i == 2*r) ? 1 : (i % 2 == 0) ? 2 : 4;
const Double res = calc(1.0 / (2*N) * i);
ret += coef * res;
}
ret *= (1.0 / (2*N));
ret /= 3.0;
return ret;
};
auto hard = [&](int l, int r) -> Double {
if (l == r) return 0.0;
const Double sL = 1.0 / N * l;
const Double sR = 1.0 / N * r;
Double ret = 0.0;
for (int j = 0; j <= 2*M; ++j) {
const int coef = (j == 0 || j == 2*M) ? 1 : (j % 2 == 0) ? 2 : 4;
const Double res = calc(sL + (sR - sL) / (2*M) * j);
ret += coef * res;
}
ret *= ((sR - sL) / (2*M));
ret /= 3.0;
return ret;
};
Double ans = 0.0;
if (~I0) {
// if(0){
int l = I0 - 1, r = I0 + 2;
chmax(l, 0);
chmin(r, N);
// cerr<<"l = "<<l<<", r = "<<r<<endl;
ans += easy(0, l);
ans += hard(l, r);
ans += easy(r, N);
} else {
ans += easy(0, N);
}
// cerr<<"easy(0,N) = "<<easy(0,N)<<endl;
// cerr<<"hard(0,N) = "<<hard(0,N)<<endl;
printf("%.12f\n", (double)ans);
}
#ifndef LOCAL
break;
#endif
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3996kb
input:
3 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1
output:
0.333333333333 0.765195716471 1.076635732895
result:
ok 3 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3952kb
input:
3 0 1 0 0 0 -1 0 2 0 0 1 0 2 0 -1 0 -1000 0 0 999 0 -998 999 0
output:
0.777777777778 0.777777777778 1521.070405024590
result:
ok 3 numbers
Test #3:
score: 0
Accepted
time: 1285ms
memory: 3840kb
input:
100000 -4 -10 -8 -8 5 5 -10 -8 -10 10 -1 -3 -3 5 -1 -3 8 -7 8 -10 0 -3 0 10 6 -1 0 2 0 -3 3 1 -6 -5 5 3 3 5 -4 -8 1 9 1 -1 2 -1 -6 0 1 -2 -7 -9 -1 -2 -4 5 6 -10 7 1 0 -6 -8 -8 -10 9 2 3 -7 -10 4 -9 8 4 4 9 -9 3 0 4 5 -2 9 8 -9 -5 7 8 -1 1 0 1 -4 1 -8 1 3 3 10 3 3 0 -6 -2 -3 -3 -3 3 -2 7 -10 -7 9 2 6...
output:
9.028267617368 5.744131448899 14.594278702892 2.952178245535 4.993502694177 6.058717255557 7.459408700251 11.228028907920 16.325707847495 11.072245157190 9.504557451155 5.500000000000 9.040049985829 5.326347910887 3.035934371290 5.808804183106 17.363719789522 9.995194519237 6.993302622881 6.55043322...
result:
ok 100000 numbers
Test #4:
score: 0
Accepted
time: 1432ms
memory: 4056kb
input:
100000 0 3 -9 1 -9 1 9 -1 -9 8 -8 6 7 2 -9 8 -7 -9 -1 4 -7 -10 -7 -9 6 1 -2 -10 -2 -10 -1 4 -5 -7 7 6 -10 10 -5 -7 -7 3 -7 -7 -7 3 -10 -8 5 -9 -8 -10 9 10 5 -9 -6 -5 -7 2 3 -2 -6 -5 1 -4 -4 -6 1 -4 -8 1 -8 -3 -6 8 -6 8 0 2 -9 -4 -7 2 2 7 -9 -4 -6 7 6 6 -6 7 0 8 -5 -8 -9 -10 4 -5 -9 -10 10 7 -7 7 10 ...
output:
6.516226342418 7.895152181059 7.619252804124 6.272101354109 10.676587784418 4.048146349223 13.704168816525 5.960724885266 4.752273723776 5.808486858343 6.049334617409 4.212001303540 5.231052190723 7.816888558919 4.839493440446 6.085980058687 8.540849032641 6.899466200899 5.198575702570 7.92716381072...
result:
ok 100000 numbers
Test #5:
score: 0
Accepted
time: 391ms
memory: 3632kb
input:
100000 4 9 0 -4 0 -4 4 9 7 0 10 -1 4 1 -2 3 0 -9 -5 -10 -5 -10 5 -8 -5 6 -6 5 -7 4 -5 6 -2 -7 -6 0 -10 7 -6 0 -8 10 -4 1 -4 1 0 -8 -7 1 -7 6 -7 -5 -7 -1 -8 0 -9 10 -7 -10 -9 10 -9 -3 -1 8 -9 -3 -1 8 0 -6 -5 -3 5 -9 0 -6 4 5 -3 -9 4 5 2 1 -5 -3 8 7 8 7 -5 -3 8 -10 -5 1 8 -10 -5 1 -9 -5 2 -2 -9 -5 2 -...
output:
4.533823502912 7.905694150421 3.399346342395 0.942809041582 8.062257748299 9.848857801796 6.500000000000 6.699917080747 4.533823502912 5.830951894845 6.016087653749 5.467073155619 5.676462121975 3.800584750330 5.517648452416 3.887301263230 2.603416558636 4.333333333333 2.867441755681 3.518518518519 ...
result:
ok 100000 numbers
Test #6:
score: 0
Accepted
time: 390ms
memory: 3760kb
input:
100000 -5 1 -4 1 9 1 -5 1 -7 -9 -6 3 -7 -9 -6 3 -3 -9 10 -9 -3 -9 -5 -9 -9 -8 6 1 1 -2 -9 -8 0 -1 -1 -5 0 -1 -2 -9 3 -8 7 -1 3 -8 7 -1 -10 -1 1 -5 -10 -1 1 -5 -4 2 -6 8 -6 8 -5 5 -7 5 5 0 5 0 -7 5 -7 2 -6 -5 -6 -5 -7 2 2 8 8 -3 8 -3 2 8 -10 7 -5 -8 -5 -8 -8 1 -5 0 -5 -7 -5 4 -5 -7 -2 -6 -10 -1 -2 -6...
output:
6.523809523810 4.013864859597 7.500000000000 5.507010122909 2.748737083745 2.687419249433 3.901566636907 2.108185106779 4.333333333333 2.357022603955 4.176654695381 5.059644256269 3.484848484848 3.144660377352 4.027681991198 7.923222137911 2.357022603955 5.734883511362 2.981423970000 3.887301263230 ...
result:
ok 100000 numbers
Test #7:
score: 0
Accepted
time: 1275ms
memory: 3980kb
input:
100000 -3 -4 -1 1 -4 -6 6 10 -7 9 10 -5 1 -10 -4 5 9 -8 -8 9 7 -6 1 1 1 4 5 -2 -9 8 0 -10 -2 3 6 -3 -3 -8 7 9 5 5 0 6 -9 0 -8 3 0 0 -10 8 -6 6 -3 -10 -7 1 5 -2 4 4 -10 6 -7 1 5 -1 -6 -5 0 5 3 -8 -8 -5 -9 -6 -1 -3 6 -3 5 -6 4 8 0 5 -10 10 8 -3 -1 8 0 5 -3 -9 7 -5 -1 -8 5 8 5 -4 -6 0 3 -6 6 7 1 7 3 1 ...
output:
6.044841559803 8.806908441629 7.211988492479 9.705894454248 5.879889741595 11.751734336573 7.387327468562 7.552508251824 4.795900554087 4.585511110030 11.636587321970 6.539467273582 8.155918942809 6.932750626221 3.744379817475 11.401172906234 16.839940311399 14.410838201436 6.386042190398 10.8509848...
result:
ok 100000 numbers
Test #8:
score: 0
Accepted
time: 1349ms
memory: 4056kb
input:
100000 -7 8 0 7 7 6 -3 3 -8 -3 9 -8 -8 -3 -6 10 -1 10 -4 10 5 10 -8 -5 3 -3 7 -9 7 -9 4 10 9 -3 2 -6 2 -6 3 8 -10 -3 0 -4 -7 4 -10 -3 7 7 -2 7 -3 7 9 10 -4 -10 7 -1 3 -1 -4 -10 3 8 -2 -5 3 8 6 1 -1 -3 6 2 -10 5 6 2 3 7 -3 3 -4 -10 6 9 -10 -8 -1 1 0 -9 6 8 -8 0 -9 6 -9 2 -7 -6 -1 6 0 0 0 3 1 -6 -2 8 ...
output:
6.797092276545 12.429172495125 8.976426143538 7.486123031633 7.130299838225 6.028769291788 4.087930934617 4.823038522433 6.123128729390 7.246635688918 7.724226961177 10.316193728710 5.124308856571 4.791595303088 3.302047238927 2.312246344813 8.410214920630 13.517584456800 8.533966057096 8.5450889120...
result:
ok 100000 numbers
Test #9:
score: 0
Accepted
time: 390ms
memory: 3684kb
input:
100000 6 -9 7 6 6 -9 7 6 8 10 -3 -7 -3 -7 8 10 5 7 6 -6 6 -6 5 7 0 -5 -5 7 0 -5 -5 7 -4 7 1 -8 1 -8 -4 7 -7 -2 -3 7 -3 7 -7 -2 -8 3 -10 -8 -10 -8 -8 3 -5 1 -9 8 -5 1 -9 8 -8 3 -5 -2 -5 -2 -8 3 -6 7 -3 -8 -6 7 -3 -8 6 -1 0 1 6 -1 0 1 6 -4 -8 3 6 -4 -8 3 1 -6 -4 10 -4 10 1 -6 -6 10 9 -4 -6 10 9 -4 -2 ...
output:
5.011098792791 6.749485577106 4.346134936802 4.333333333333 5.270462766947 3.282952600599 3.726779962500 2.687419249433 1.943650631615 5.099019513593 2.108185106779 5.217491947500 5.587684871413 6.839428176228 1.699673171198 6.324555320337 3.431876713662 2.828427124746 5.666666666667 4.921607686744 ...
result:
ok 100000 numbers
Test #10:
score: 0
Accepted
time: 1275ms
memory: 4056kb
input:
100000 50 -71 4 90 -69 -29 12 -1 -98 -38 -10 34 -40 -94 48 19 -2 36 -25 -55 -56 38 -22 -84 -80 -18 28 63 1 -14 74 -19 73 59 76 -61 -52 -28 -97 -91 -9 -54 89 33 -65 93 -64 12 -65 -77 79 87 -95 -40 49 -61 -88 -97 47 83 59 65 -30 -35 -55 59 89 -91 27 98 -17 93 -49 84 74 -90 37 4 -59 -18 72 -27 63 -34 9...
output:
77.596705004737 83.979645362573 49.327207070996 83.974820099519 163.879147592891 128.662991662278 86.719766613179 72.434035081333 120.317190035193 65.378944997709 38.467358046173 142.394344968573 172.484435283356 88.797397645167 103.861006339023 112.660658340547 53.222933957415 53.750870341578 119.3...
result:
ok 100000 numbers
Test #11:
score: 0
Accepted
time: 1418ms
memory: 3884kb
input:
100000 74 50 60 -48 -17 -68 74 50 57 80 36 23 -1 -98 57 80 94 -87 4 1 4 1 44 -70 8 90 -93 -87 -93 -87 10 -51 56 -56 43 -16 56 -56 49 20 56 -21 85 24 56 -21 -45 24 46 -83 67 -90 46 -83 -96 -54 7 -59 -81 95 52 -63 -81 95 -96 -74 -6 92 -6 92 -100 72 91 33 -9 55 -9 55 -27 5 30 36 58 -40 88 -31 30 36 49 ...
output:
58.366697243187 69.863330974219 43.490764400893 87.084290278552 26.087927019384 68.005214731339 83.472363923873 69.433387650766 86.012446756067 63.715166111899 33.878784640388 62.029070851080 66.298085751845 34.852023277595 40.565384049314 68.634388327701 69.446066473601 85.792227570852 88.739697776...
result:
ok 100000 numbers
Test #12:
score: 0
Accepted
time: 415ms
memory: 3828kb
input:
100000 91 -43 -73 29 9 -7 -73 29 26 25 -20 71 81 -30 73 -22 86 60 65 -5 44 -70 86 60 34 3 -65 23 34 3 -65 23 -8 0 14 99 -20 -54 14 99 -36 5 21 -43 -74 37 59 -75 35 45 -66 -90 -66 -90 35 45 -78 -39 27 -52 27 -52 -78 -39 47 30 -10 -83 -10 -83 47 30 -94 17 55 -63 -94 17 55 -63 15 -20 55 -86 35 -53 15 -...
output:
59.702968472635 104.651803615609 45.538750287835 33.666666666667 49.532454535260 46.130471579676 56.200039541307 35.267233769858 42.187412551350 56.372767263005 25.725041842100 25.510346484863 40.706264874095 35.377429245212 59.702968472635 39.491208585653 29.340908112887 51.066745539539 60.08327554...
result:
ok 100000 numbers
Test #13:
score: 0
Accepted
time: 411ms
memory: 3756kb
input:
100000 34 -90 -37 73 -37 73 34 -90 13 -85 60 15 60 15 13 -85 -58 -54 -95 58 -95 58 -58 -54 -3 -70 96 -52 96 -52 74 -56 -59 81 -25 16 -25 16 9 -49 -98 54 40 50 -98 54 40 50 -90 53 6 -50 -90 53 6 -50 -79 22 -27 -18 -79 22 51 -78 3 -25 42 -1 3 -25 -88 -81 -17 46 -79 -40 14 89 -79 -40 -40 18 -8 -2 -8 -2...
output:
59.264004439645 36.831447915546 39.317793540443 40.787536256246 73.355299740373 46.019319614460 46.933759467762 57.950975449560 76.321687612369 50.064464615972 28.301943396170 32.743107841363 38.042374035044 40.311288741493 38.315938082097 66.049224068115 54.116130271441 42.038342286801 62.770304373...
result:
ok 100000 numbers
Test #14:
score: 0
Accepted
time: 1278ms
memory: 3948kb
input:
100000 -43 -66 58 -73 53 59 57 45 57 9 -87 34 -60 -16 23 8 -85 29 60 -50 -60 64 61 -5 17 66 -58 52 95 1 -21 74 -43 -29 52 21 6 6 56 -2 -9 -50 -37 30 -41 -56 -69 41 52 50 42 6 -10 -26 46 85 66 80 35 -54 -3 95 6 7 -49 34 42 47 84 23 -5 -5 46 39 61 24 -61 -35 -96 76 98 -16 81 -35 -5 34 -53 -47 23 -82 -...
output:
133.422687496635 50.644821221567 69.955105650838 65.811674714040 37.060285155864 46.813610979707 45.083939963339 74.735619795524 61.806243114659 136.507674639486 122.814089323194 92.257707076590 63.249310241352 163.589101250705 90.477077823374 124.397353658420 39.994842256220 86.476683977190 66.9079...
result:
ok 100000 numbers
Test #15:
score: 0
Accepted
time: 1398ms
memory: 3768kb
input:
100000 7 -57 -48 -29 -8 -36 -48 -29 12 96 28 -93 -47 58 28 -93 -63 -41 -69 60 -10 -21 -63 -41 43 -57 -69 58 -69 58 -74 34 82 -68 61 98 40 -60 82 -68 -46 87 -75 -25 -75 -25 -56 25 92 90 75 88 -27 76 58 -29 50 -100 68 60 60 -93 50 -100 83 -50 76 77 83 -50 -75 80 -80 -69 63 -80 13 58 11 -76 -95 -9 -6 -...
output:
21.467415419403 72.540916222249 55.550961539808 75.739380142006 83.071435678427 39.777700256266 101.947714522290 77.083991374081 94.066474164818 82.129527057005 82.889437065902 57.732847783009 63.883992880736 58.635820610967 103.974451216861 60.056323798162 24.086589316433 118.900466702855 41.307194...
result:
ok 100000 numbers
Test #16:
score: 0
Accepted
time: 409ms
memory: 3628kb
input:
100000 -53 -68 -69 -15 -53 -68 -69 -15 35 50 -61 -2 35 50 -61 -2 -52 91 77 -4 -52 91 77 -4 -7 -86 -79 -47 -7 -86 -79 -47 -45 46 -50 90 -50 90 -45 46 -25 -2 -32 -58 -25 -2 -32 -58 71 20 82 23 82 23 71 20 -97 94 64 51 64 51 -97 94 -26 -87 -1 -16 -1 -16 -26 -87 -58 30 -21 -28 -21 -28 -58 30 -26 -90 -63...
output:
18.454147380889 36.392917503883 53.402039078838 27.294688127912 14.761059883656 18.811934746030 3.800584750330 55.547777233257 25.090945688745 22.932267417089 38.054055120461 16.606558276108 19.846634195472 50.982567826878 26.308004696501 51.808407726074 30.112751082852 42.064764880413 57.2712842531...
result:
ok 100000 numbers
Test #17:
score: 0
Accepted
time: 1291ms
memory: 3828kb
input:
100000 541 17 967 -860 -970 -232 419 -236 -905 -139 -974 -189 24 267 -912 974 207 -639 398 -939 -31 -897 -527 -91 109 357 234 -959 -778 -920 -4 43 645 395 522 372 773 547 563 712 -777 -353 183 -700 218 562 -17 111 924 41 71 -664 -756 845 -939 103 -601 739 584 -670 -481 158 454 -810 -189 -92 -417 -66...
output:
1077.388887977431 986.154539459444 675.175454690697 731.446775039608 271.783669719026 994.707291771488 1599.696102060803 655.579132413343 1290.257232189615 500.634041959773 1131.040173433258 1252.726588287110 736.804586666694 508.487554587867 909.408751371929 898.404205633219 693.489680345789 1108.4...
result:
ok 100000 numbers
Test #18:
score: 0
Accepted
time: 1424ms
memory: 3948kb
input:
100000 344 -566 -889 -145 418 -90 344 -566 -221 -485 -190 757 -221 -485 116 -337 -166 159 -185 697 -166 159 307 -455 -587 728 197 -273 -587 728 -74 -682 -926 913 318 -963 847 -224 318 -963 979 -674 792 574 -250 454 792 574 339 165 420 -963 420 -963 -923 606 -44 939 28 767 964 -974 -44 939 934 -842 9...
output:
692.587570591297 601.720709776522 631.819135731920 543.747869277141 1141.297157298748 897.087116436556 850.446807575870 993.820852795345 668.224532618179 237.791893931384 317.797310510390 248.830054766205 843.116541423362 454.656890013201 710.145619876050 742.534057362624 564.876910405558 998.895002...
result:
ok 100000 numbers
Test #19:
score: 0
Accepted
time: 407ms
memory: 3620kb
input:
100000 249 365 292 977 292 977 163 -859 -939 -821 521 351 521 351 156 58 109 21 -421 -294 109 21 -951 -609 599 873 -452 388 -452 388 599 873 755 -589 -780 97 -780 97 755 -589 -122 556 860 -72 369 242 860 -72 -529 834 -340 752 -340 752 227 506 -481 -801 -193 -813 263 -832 -1 -821 78 -169 -301 143 -30...
output:
681.676401270708 741.084574945547 411.028520232410 385.836177095352 560.438419652170 388.545435638557 412.043687004181 468.406073829108 327.268153727863 487.844806834669 773.056918991092 156.553150363986 264.639167337129 649.914951700947 555.641171180746 389.341007027370 221.932171820331 759.9761876...
result:
ok 100000 numbers
Test #20:
score: 0
Accepted
time: 414ms
memory: 3760kb
input:
100000 912 -157 133 -554 133 -554 912 -157 -48 -679 -180 -647 -180 -647 -147 -655 -238 181 -27 333 -27 333 -449 29 107 278 808 844 -594 -288 107 278 -261 -116 507 229 507 229 -261 -116 -191 147 823 -838 -191 147 823 -838 170 -405 -629 -119 170 -405 969 -691 242 887 -621 -246 242 887 -621 -246 730 42...
output:
291.442771207126 53.763435013440 173.365381652611 900.975582355038 280.643902481419 471.218397113034 848.644212847763 474.746482053550 402.161106467987 666.687499674489 217.988711003575 357.430956813885 514.075329542709 216.241120562723 222.044039675816 410.785291308678 609.800172187578 445.04032276...
result:
ok 100000 numbers
Test #21:
score: 0
Accepted
time: 1321ms
memory: 4012kb
input:
100000 188 593 -923 -569 527 -406 -314 383 925 -781 -643 79 68 -89 -997 951 -691 -611 -189 124 -863 -526 -142 -22 -657 -960 980 397 11 -891 -435 181 216 -951 -407 -624 954 726 555 -876 -66 734 355 502 566 -400 -983 -657 417 -546 599 -858 183 -675 -599 301 782 144 -849 -434 -634 -83 620 207 961 -786 ...
output:
674.208276697537 1056.720401249611 311.654867966392 714.636567891869 1164.816309948235 1274.091439263623 891.565373048441 570.655759763330 966.174623563179 1218.861856748168 537.988061227251 1086.364472653035 1227.393445747844 647.338865893999 398.215846520340 615.482980311070 662.026586745361 621.6...
result:
ok 100000 numbers
Test #22:
score: 0
Accepted
time: 1392ms
memory: 3912kb
input:
100000 -750 -751 -173 134 680 936 -750 -751 -324 -818 78 196 -56 -142 553 576 -385 968 443 131 -588 288 811 -241 -652 -352 149 771 -652 -352 -67 131 363 -636 -888 -192 533 -371 -888 -192 148 841 407 762 532 792 407 762 747 810 438 490 -480 -268 -489 -470 -149 920 -153 -200 -155 -760 -312 -774 860 -9...
output:
756.692625540738 668.264226748307 707.760535007335 478.444111982705 502.737922490954 194.597806683909 1483.235394330066 1131.249465590582 1485.945304173072 607.103926633523 645.865525222500 737.668438265545 830.467019786492 588.635942592848 480.155175325674 666.055126988118 723.149201889320 562.8817...
result:
ok 100000 numbers
Test #23:
score: 0
Accepted
time: 416ms
memory: 3860kb
input:
100000 -802 -93 -8 607 -802 -93 -8 607 -861 338 748 -826 -861 338 748 -826 559 912 -927 -473 559 912 -927 -473 381 40 -776 -706 381 40 -776 -706 340 -550 -421 -502 -421 -502 340 -550 895 -134 75 912 75 912 895 -134 -178 -448 242 763 -178 -448 242 763 995 56 -708 -699 -708 -699 995 56 -149 570 -999 3...
output:
352.835498340075 661.964836259785 677.119799018034 458.883306395960 254.170764994281 443.034485740733 427.254933005785 620.952136283913 294.960637675229 229.987922388208 403.068783763324 181.502372191416 329.795391113945 51.009802979427 325.949041688694 431.532669034970 289.913780286484 318.47989645...
result:
ok 100000 numbers
Test #24:
score: -100
Wrong Answer
time: 1255ms
memory: 4004kb
input:
100000 774 -797 772 -799 -831 601 -831 600 305 -123 307 -124 -251 -445 -251 -443 429 654 429 652 160 972 158 971 -741 979 -739 980 128 793 126 791 -288 173 -286 171 -922 989 -922 987 351 405 351 406 289 -675 290 -677 -671 38 -669 40 109 898 108 899 -485 803 -485 802 -84 -604 -83 -604 -810 -556 -808 ...
output:
2128.055206262731 642.627255905014 417.543749320377 887.043338534065 1033.963798175748 1083.247249385787 1159.656271438413 1462.684034005067 1079.078619316886 1280.991929078531 376.522465022627 1844.758684940352 650.380757818414 1337.527806517443 598.672367233350 1067.942354207292 1086.287864967546 ...
result:
wrong output format Expected double, but "-nan" found