QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#280723 | #7783. Military Maneuver | ucup-team1198# | WA | 1369ms | 4072kb | C++14 | 9.5kb | 2023-12-09 17:41:54 | 2023-12-09 17:41:55 |
Judging History
answer
#include <map>
#include <set>
#include <array>
#include <cmath>
#include <deque>
#include <bitset>
#include <random>
#include <string>
#include <vector>
#include <cassert>
#include <complex>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct Point {
long double x, y;
Point(long double x, long double y): x(x), y(y) {}
Point(): x(0ll), y(0ll) {}
};
Point operator+(const Point& first, const Point& second) {
return Point(first.x + second.x, first.y + second.y);
}
Point operator-(const Point& first, const Point& second) {
return Point(first.x - second.x, first.y - second.y);
}
long double cross(const Point& first, const Point& second) {
return first.x * second.y - first.y * second.x;
}
long double dot(const Point& first, const Point& second) {
return first.x * second.x + first.y * second.y;
}
long double sqrlen(const Point& P) {
return P.x * P.x + P.y * P.y;
}
long double len(const Point& P) {
return sqrtl(sqrlen(P));
}
const long double INF = 1e9;
const long double EPS = 1e-12;
struct Line{
long double a;
long double b;
long double c;
Line(long double a, long double b, long double c): a(a), b(b), c(c) {}
Point get_perp() const {
return Point(a, b);
}
long double get_y_by_x(long double x) const {
return (-c - a * x) / b;
}
};
long double inter(const Line& l1, const Line& l2) {
return (-l1.c * l2.b + l2.c * l1.b) / (l1.a * l2.b - l2.a * l1.b);
}
// ax + by+c>=0
vector<Point> halfplane_inter(vector<Line>& lines) {
long double min_x = -INF;
long double max_x = INF;
vector<Line> up;
vector<Line> down;
for (Line l : lines) {
if (l.b == 0) {
if (l.a > 0) {
min_x = max(min_x, -l.c / l.a);
} else {
max_x = min(max_x, -l.c / l.a);
}
} else if (l.b > 0) {
up.emplace_back(l);
} else {
down.emplace_back(l);
}
}
if (max_x - min_x < EPS) {
return {};
}
sort(up.begin(), up.end(), [](const Line& l1, const Line& l2) {
if (abs(cross(l1.get_perp(), l2.get_perp())) < EPS) {
// parallel
return l1.c / len(l1.get_perp()) < l2.c / len(l2.get_perp());
}
return cross(l1.get_perp(), l2.get_perp()) > 0;
});
vector<Line> up_hull;
vector<long double> up_xs;
for (Line l : up) {
// skip parallel
if (!up_hull.empty() && abs(cross(up_hull.back().get_perp(), l.get_perp())) < EPS)
continue;
if (up_hull.empty()) {
up_hull.emplace_back(l);
continue;
}
while (!up_xs.empty() && EPS >= inter(up_hull.back(), l) - up_xs.back()) {
up_hull.pop_back();
up_xs.pop_back();
}
up_xs.emplace_back(inter(up_hull.back(), l));
up_hull.emplace_back(l);
}
sort(down.begin(), down.end(), [](const Line& l1, const Line& l2) {
if (abs(cross(l1.get_perp(), l2.get_perp())) < EPS) {
// parallel
return l1.c / len(l1.get_perp()) < l2.c / len(l2.get_perp());
}
return cross(l1.get_perp(), l2.get_perp()) < 0;
});
vector<Line> down_hull;
vector<long double> down_xs;
for (Line l : down) {
// skip parallel
if (!down_hull.empty() && abs(cross(down_hull.back().get_perp(), l.get_perp())) < EPS)
continue;
if (down_hull.empty()) {
down_hull.emplace_back(l);
continue;
}
while (!down_xs.empty() && EPS >= inter(down_hull.back(), l) - down_xs.back()) {
down_hull.pop_back();
down_xs.pop_back();
}
down_xs.emplace_back(inter(down_hull.back(), l));
down_hull.emplace_back(l);
}
int i1 = 0;
int i2 = 0;
while (i1 < up_xs.size() && up_xs[i1] < min_x)
++i1;
while (i2 < down_xs.size() && down_xs[i2] < min_x)
++i2;
long double prev = min_x;
vector<Point> points;
auto try_pushing_points = [&](long double x, int i1, int i2) {
long double y_up = up_hull[i1].get_y_by_x(x);
long double y_down = down_hull[i2].get_y_by_x(x);
if (y_down - y_up > EPS) {
points.emplace_back(x, y_up);
points.emplace_back(x, y_down);
}
if (abs(cross(up_hull[i1].get_perp(), down_hull[i2].get_perp())) > EPS) {
long double cur_x = inter(up_hull[i1], down_hull[i2]);
if (prev <= cur_x && cur_x <= x)
points.emplace_back(cur_x, up_hull[i1].get_y_by_x(cur_x));
}
prev = x;
};
try_pushing_points(min_x, i1, i2);
while (i1 < up_xs.size() || i2 < down_xs.size()) {
long double cur_x = 0;
int old_i1 = i1;
int old_i2 = i2;
if (i1 < up_xs.size() && (i2 == down_xs.size() || up_xs[i1] < down_xs[i2])) {
cur_x = up_xs[i1];
++i1;
} else {
cur_x = down_xs[i2];
++i2;
}
if (cur_x > max_x)
cur_x = max_x;
try_pushing_points(cur_x, old_i1, old_i2);
if (cur_x == max_x)
break;
}
if (prev < max_x) {
try_pushing_points(max_x, i1, i2);
}
return points;
}
void srt(vector<Point>& arr) {
Point p0 = arr[0];
sort(arr.begin(), arr.end(), [&p0](Point a, Point b) {
if (cross(a - p0, b - p0) == 0) {
return sqrlen(a - p0) < sqrlen(b - p0);
}
return cross(a - p0, b - p0) < 0;
});
vector<Point> st;
int sz = 0;
arr.push_back(arr[0]);
for (auto elem : arr) {
while (sz >= 2 && cross(st[sz - 1] - st[sz - 2], elem - st[sz - 1]) >= 0) {
st.pop_back();
--sz;
}
st.push_back(elem);
++sz;
}
st.pop_back();
arr = st;
}
long double get(const vector<Point>& arr, int alpha) {
int k = arr.size();
long double ans = 0;
long double minx = 1e9, maxx = -1e9;
for (int i = 0; i < k; ++i) {
minx = min(minx, arr[i].x);
maxx = max(maxx, arr[i].x);
}
for (int i = 0; i < k; ++i) {
long double x1 = arr[i].x;
long double x2 = arr[(i + 1) % k].x;
long double y1 = arr[i].y;
long double y2 = arr[(i + 1) % k].y;
if (abs(x2 - x1) < 1e-12 && (abs(x1 - minx) < 1e-12 || abs(x1 - maxx) < 1e-12)) continue;
long double dlta = 1;
long double add = x1;
for (int i = 1; i <= alpha; ++i) {
dlta = dlta * x2 + add;
add *= x1;
}
long double dlta2 = dlta * x2 + add;
ans += dlta / (alpha + 1) * (y1 * x2 - x1 * y2) + dlta2 / (alpha + 2) * (y2 - y1);
}
return ans;
}
int main() {
#ifdef DEBUG
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#else
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
#endif
int xl, yl, xr, yr;
cin >> xl >> yl >> xr >> yr;
int n;
cin >> n;
vector<array<int, 2>> arr(n);
for (int i = 0; i < n; ++i) {
cin >> arr[i][0] >> arr[i][1];
}
long double ans = 0;
for (int i = 0; i < n; ++i) {
vector<Line> hp;
hp.push_back({1, 0, -xl});
hp.push_back({-1, 0, xr});
hp.push_back({0, 1, -yl});
hp.push_back({0, -1, yr});
for (int j = 0; j < n; ++j) {
if (i == j) continue;
long double A = arr[j][0] - arr[i][0];
long double B = arr[j][1] - arr[i][1];
long double x = arr[i][0] + arr[j][0];
long double y = arr[i][1] + arr[j][1];
x /= 2;
y /= 2;
long double C = -A * x - B * y;
/// cerr << i << ": " << A << " " << B << " " << C << endl;
/// cerr << A * arr[j][0] + B * arr[j][1] + C << endl;
hp.push_back({A, B, C});
}
auto res = halfplane_inter(hp);
if (!res.empty()) {
srt(res);
/**cerr << "res: " << endl;
for (auto elem : res) {
cerr << elem.x << " " << elem.y << endl;
}*/
long double I2 = get(res, 2);
long double I1 = get(res, 1);
long double I0 = get(res, 0);
/// cerr << i << ": " << I0 << " " << I1 << " " << I2 << endl;
ans += I2 - 2 * I1 * arr[i][0] + I0 * arr[i][0] * arr[i][0];
for (Point& p : res) {
swap(p.x, p.y);
}
reverse(res.begin(), res.end());
I2 = get(res, 2);
I1 = get(res, 1);
I0 = get(res, 0);
/// cerr << i << ": " << I0 << " " << I1 << " " << I2 << endl;
ans += I2 - 2 * I1 * arr[i][1] + I0 * arr[i][1] * arr[i][1];
}
hp.clear();
hp.push_back({1, 0, -xl});
hp.push_back({-1, 0, xr});
hp.push_back({0, 1, -yl});
hp.push_back({0, -1, yr});
for (int j = 0; j < n; ++j) {
if (i == j) continue;
long double A = arr[j][0] - arr[i][0];
long double B = arr[j][1] - arr[i][1];
long double x = arr[i][0] + arr[j][0];
long double y = arr[i][1] + arr[j][1];
x /= 2;
y /= 2;
long double C = -A * x - B * y;
hp.push_back({-A, -B, -C});
}
res = halfplane_inter(hp);
if (!res.empty()) {
srt(res);
/**cerr << "res: " << endl;
for (auto elem : res) {
cerr << elem.x << " " << elem.y << endl;
}*/
long double I2 = get(res, 2);
long double I1 = get(res, 1);
long double I0 = get(res, 0);
ans -= I2 - 2 * I1 * arr[i][0] + I0 * arr[i][0] * arr[i][0];
for (Point& p : res) {
swap(p.x, p.y);
}
reverse(res.begin(), res.end());
I2 = get(res, 2);
I1 = get(res, 1);
I0 = get(res, 0);
ans -= I2 - 2 * I1 * arr[i][1] + I0 * arr[i][1] * arr[i][1];
}
}
ans /= (xr - xl) * (yr - yl);
long double PI = 3.141592653589793238;
cout << fixed << setprecision(20);
cout << PI * ans << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3784kb
input:
0 0 2 2 2 3 1 1 3
output:
8.37758040957278164382
result:
ok found '8.3775804', expected '8.3775804', error '0.0000000'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
0 0 2 2 2 5 1 1 3
output:
37.69911184307751739198
result:
ok found '37.6991118', expected '37.6991118', error '0.0000000'
Test #3:
score: 0
Accepted
time: 817ms
memory: 4044kb
input:
-2911 2151 336 5941 2000 -83 79 -94 47 48 -29 -47 64 84 75 -44 -86 -58 -11 -31 58 20 53 80 -19 -82 74 -60 -26 8 -68 -42 -61 -14 12 -58 -18 92 10 35 -26 71 64 76 89 -80 6 70 4 -96 -99 95 -80 -3 -22 71 -89 -75 17 -35 -82 -59 95 60 48 -74 50 -82 90 -26 5 -75 -31 -45 85 85 14 -70 -57 59 46 55 13 -23 60 ...
output:
6657168.14285338570107342093
result:
ok found '6657168.1428534', expected '6657168.1428534', error '0.0000000'
Test #4:
score: 0
Accepted
time: 823ms
memory: 4020kb
input:
-3013 5287 7654 9132 2000 -19 49 -17 -35 64 68 48 -49 -72 -14 29 -93 -13 -8 -80 11 39 88 -31 82 68 -66 5 41 -74 -8 0 15 11 34 69 -12 15 -86 5 -78 -48 73 10 9 -2 8 81 52 41 -43 -45 -41 -23 60 -40 -45 -26 27 -32 73 8 -20 2 91 46 17 51 -66 -65 -32 37 -9 58 63 -14 -31 60 -56 -85 -22 9 -66 -7 -53 -21 40 ...
output:
10130702.49401498986935621360
result:
ok found '10130702.4940150', expected '10130702.4940150', error '0.0000000'
Test #5:
score: 0
Accepted
time: 1247ms
memory: 3884kb
input:
-5561 9559 6905 9930 2000 79 338 2 214 325 -193 -390 -157 -517 943 -759 970 449 901 -369 636 -661 -211 847 -558 223 -564 185 822 -656 -854 -991 -617 -422 -169 -63 -799 327 -911 -960 945 -948 831 -494 93 266 -299 139 -535 796 707 75 -146 10 566 72 -713 -132 -341 348 924 -739 -838 982 995 -445 500 -71...
output:
158891446.62387780076824128628
result:
ok found '158891446.6238778', expected '158891446.6238778', error '0.0000000'
Test #6:
score: 0
Accepted
time: 939ms
memory: 4072kb
input:
-5245 -7558 1275 934 2000 -40 125 79 -30 49 13 -127 153 -151 -28 -82 -140 147 131 123 -105 -84 71 -49 -146 -140 82 57 172 -140 -32 -173 24 -55 -101 44 142 -68 -114 122 69 -137 66 19 199 31 109 -161 -66 63 -101 65 -114 166 -66 83 -162 60 70 -19 -134 15 161 -130 22 -130 50 8 -121 150 89 132 44 -131 -3...
output:
11172638.26562712203485716600
result:
ok found '11172638.2656271', expected '11172638.2656236', error '0.0000000'
Test #7:
score: 0
Accepted
time: 632ms
memory: 3756kb
input:
-7167 6117 -3297 6866 2000 -346 -144 -227 169 -168 -373 -63 -227 -24 405 -232 -163 295 22 222 351 293 41 -335 260 -43 -426 -205 193 163 -284 -406 284 -202 -114 -339 -86 -413 17 -237 -394 -333 -145 -104 416 -478 -53 451 102 85 58 -124 -472 424 -88 394 243 -459 45 12 -490 -9 465 -159 -202 315 -272 -24...
output:
52361392.51502746514233876951
result:
ok found '52361392.5150275', expected '52361392.5150275', error '0.0000000'
Test #8:
score: 0
Accepted
time: 1249ms
memory: 4008kb
input:
-6462 -5871 5937 5853 2000 386 236 -108 937 -722 354 -710 -475 462 613 -884 446 595 -675 168 394 -744 -551 761 -399 -688 258 -53 104 -614 -177 -273 -678 794 -15 224 -911 -146 -216 53 633 2 -664 202 -440 24 437 495 623 -297 682 -520 -48 598 720 -7 353 163 744 557 13 395 588 -157 -672 631 -705 -68 818...
output:
57605018.87011638193871476687
result:
ok found '57605018.8701164', expected '57605018.8701164', error '0.0000000'
Test #9:
score: 0
Accepted
time: 1237ms
memory: 3824kb
input:
792 4703 2923 5458 2000 7281 5289 -5154 2943 -8483 3113 9380 -576 -2191 -291 -8200 898 -192 4724 1161 441 34 3999 8544 3576 -5481 4273 -9792 9565 4854 1262 4254 -3376 -5778 9480 8631 -2225 7129 2187 5344 7740 2975 6174 -2919 -7172 7990 -5117 -6823 -7233 5020 5269 -9874 1051 8841 4586 -3612 -7483 644...
output:
1133083681.54547014867421239614
result:
ok found '1133083681.5454702', expected '1133083681.5454702', error '0.0000000'
Test #10:
score: 0
Accepted
time: 1061ms
memory: 3904kb
input:
-4075 7303 -1671 8073 2000 -10 305 -1105 -119 -238 205 -1206 -482 943 -89 -1578 223 -520 1158 21 1622 -621 -886 -163 -515 283 1802 36 -1410 213 -1921 -1539 -231 835 148 56 1448 -407 1653 1896 -533 1321 -437 530 172 132 18 1260 586 -363 -220 989 1353 281 -1907 -1116 -801 695 592 1221 -983 1731 -939 -...
output:
205950762.73416204318345990032
result:
ok found '205950762.7341620', expected '205950762.7341621', error '0.0000000'
Test #11:
score: 0
Accepted
time: 1193ms
memory: 4052kb
input:
2121 3865 3457 7582 2000 3902 -1511 -1817 504 -3515 3188 -4470 211 536 1795 2230 -1512 3979 297 2430 901 2368 2525 -2553 -252 476 2279 -3859 2565 -754 396 3358 2726 4787 -664 173 1056 -1154 -1556 -2442 -406 -1838 976 3785 1136 -131 -421 77 4058 3773 2965 1333 -622 4188 -2571 -624 -2051 -1965 4268 -1...
output:
399702074.05400643512257374823
result:
ok found '399702074.0540065', expected '399702074.0540065', error '0.0000000'
Test #12:
score: 0
Accepted
time: 1208ms
memory: 4060kb
input:
5377 -2525 9878 7241 2000 316 9854 1690 3184 -9795 -898 -7924 3181 -2410 1478 -3849 -8880 8447 -487 3826 -2478 1445 -2923 5459 677 8830 -3598 1045 -5139 7231 -6856 -4410 4982 -3180 -2528 -7891 -4137 6686 -3732 -6102 -1926 6562 5714 4562 -5710 223 -9921 2609 -3935 8187 55 -5017 -4465 -1387 -2695 6015...
output:
1061816977.66765946632949635386
result:
ok found '1061816977.6676595', expected '1061816977.6676595', error '0.0000000'
Test #13:
score: 0
Accepted
time: 1369ms
memory: 3996kb
input:
-3243 -8661 4122 -2937 2000 1 7637 0 1870 1 7982 -1 -391 0 -4347 -1 2035 0 -2623 0 6943 0 1511 0 -8789 -1 7213 1 -4998 1 -8958 1 -182 -1 -318 1 3712 0 -3215 1 -5210 1 6983 -1 -2567 1 -470 -1 7652 0 -2394 1 7196 1 280 1 5785 1 545 1 8779 1 1 1 -9675 1 5137 -1 -1160 1 -3955 0 3176 0 -6143 0 519 1 5678...
output:
791760973.95850038016214966774
result:
ok found '791760973.9585004', expected '791760973.9585004', error '0.0000000'
Test #14:
score: 0
Accepted
time: 351ms
memory: 4008kb
input:
-4763 3483 5561 3747 2000 -3915 1 8391 -1 -4112 0 5453 -1 -8775 1 -2182 0 -3819 1 -2702 1 -7119 1 1279 0 7959 -1 -4345 0 -1024 1 -4853 -1 -2637 1 -2136 -1 -9603 -1 -5869 1 -1765 1 -3625 1 9255 0 4677 1 4660 -1 3250 1 -8156 -1 -2988 0 8492 1 -961 0 9331 -1 -1913 1 -3152 0 8877 -1 8390 0 3420 0 -7929 ...
output:
505360943.97037652652943506837
result:
ok found '505360943.9703766', expected '505360943.9703766', error '0.0000000'
Test #15:
score: 0
Accepted
time: 1250ms
memory: 4016kb
input:
-8627 -2766 -1956 4443 2000 -4 -9231 -6 -3132 4 176 1 8378 1 6264 -3 -9699 -10 -6369 -9 -4283 -7 7401 1 -1418 7 -5096 7 -7114 -4 -3937 2 5922 -1 6133 6 -8932 -6 3552 2 4767 9 7643 3 4129 4 2295 -5 8379 1 768 -10 -8915 5 4022 -6 -6665 4 4425 -3 6046 6 3827 -5 3831 -6 -6224 5 9807 9 11 5 4503 -6 -5911...
output:
448946370.79278799940948374569
result:
ok found '448946370.7927880', expected '448946370.7927880', error '0.0000000'
Test #16:
score: 0
Accepted
time: 338ms
memory: 3832kb
input:
-4229 -9182 1776 -5186 2000 8444 3 3252 6 -7072 5 5793 -1 1339 2 -3500 6 -9676 -4 -1101 -8 -4997 7 462 -6 1476 7 -1331 9 561 -4 -951 -6 -466 -8 -8455 2 8033 -5 2982 9 -7803 6 8473 1 674 5 -7228 -1 -1891 -10 -3408 -7 -917 -8 9486 -5 355 9 1212 -4 3712 10 9106 1 9958 1 7446 -5 8816 -1 -1752 4 4285 0 -...
output:
438654068.21846062323311343789
result:
ok found '438654068.2184606', expected '438654068.2184606', error '0.0000000'
Test #17:
score: 0
Accepted
time: 1324ms
memory: 3900kb
input:
-6880 -3012 949 2588 2000 56 -2490 59 -8874 -90 7871 -48 9340 -29 -4546 72 1776 -22 -8437 -7 5228 6 -2206 89 -5714 71 -6149 44 8645 -17 -8800 19 -8446 -31 -1438 58 4422 -10 -6275 98 -7180 21 -3721 14 3061 -60 -2084 45 4628 -57 -7683 -19 -5389 97 4046 58 5141 -44 288 49 -3579 -39 -7224 94 5901 -68 -3...
output:
411858700.04329922422766685486
result:
ok found '411858700.0432992', expected '411858700.0432993', error '0.0000000'
Test #18:
score: 0
Accepted
time: 324ms
memory: 4004kb
input:
2772 -6314 4903 4834 2000 -9330 45 1739 56 1062 -58 6549 -25 2178 88 -6106 -87 -6078 -75 -9429 58 2648 -27 -9516 52 9061 -9 -1775 -3 -6885 74 -4346 27 -1758 -95 -9196 87 -752 -98 1724 -24 825 8 -2431 18 -360 14 1472 52 8871 -71 7205 -39 -8033 -28 8724 8 -5197 -52 9320 -2 2849 -64 -968 -77 9867 100 3...
output:
605362233.75295623624697327614
result:
ok found '605362233.7529563', expected '605362233.7529563', error '0.0000000'
Test #19:
score: 0
Accepted
time: 1283ms
memory: 3832kb
input:
-10000 -10000 10000 10000 2000 8592 4096 9271 1216 8596 5077 9077 1756 9059 3053 8744 4685 8509 4543 7828 4581 8975 2478 9394 2850 9194 3045 9532 1437 9290 1261 8175 4923 8485 4507 8166 4987 8578 4973 9548 2129 9018 3543 8136 5431 8830 2783 9636 2605 8589 2865 9617 1981 9427 1091 7817 5017 9129 1790...
output:
238108908.69451523765746969730
result:
ok found '238108908.6945152', expected '238108908.6175798', error '0.0000000'
Test #20:
score: 0
Accepted
time: 1293ms
memory: 3948kb
input:
-10000 -10000 10000 10000 2000 6262 7501 9152 454 8076 5537 5939 7930 9638 2163 8615 4078 9554 1084 4352 8207 9578 1188 9456 406 8908 3352 5449 7414 8782 3668 8621 4472 9319 957 6598 6780 8818 2341 6747 7300 9941 555 7653 6219 9183 342 7768 5183 8604 4366 3084 8703 7005 6054 7108 6347 9604 498 9180 ...
output:
397620990.08414206173620186746
result:
ok found '397620990.0841421', expected '397620990.0841421', error '0.0000000'
Test #21:
score: 0
Accepted
time: 1259ms
memory: 3856kb
input:
-10000 -10000 10000 10000 2000 1066 9157 9386 1781 6605 7086 2309 8912 9690 2029 7780 6101 -590 9528 9389 1295 7597 5489 9036 4111 6848 6367 5728 7783 8672 4455 7349 5754 9546 1194 391 9337 7748 5828 4912 8500 3010 8983 9877 1235 6371 6950 8942 4055 2111 9469 703 9760 7671 5156 7290 5623 -135 9974 8...
output:
554491808.93941586272558197379
result:
ok found '554491808.9394158', expected '554491808.9394159', error '0.0000000'
Test #22:
score: 0
Accepted
time: 1277ms
memory: 3900kb
input:
-10000 -10000 10000 10000 2000 9179 3249 -7440 6141 1589 9872 -7325 6455 5681 8184 -5197 8181 -4609 8595 8619 4125 6442 6792 -3591 8889 9340 1215 4556 8497 8772 4168 -7033 6910 -6024 7886 9454 1423 2080 9352 799 9732 -1392 9561 -1456 9358 9027 2880 8692 3510 7747 6163 -4921 8380 9405 1846 9325 1029 ...
output:
689400531.77838507015258073807
result:
ok found '689400531.7783850', expected '689400531.7783850', error '0.0000000'
Test #23:
score: 0
Accepted
time: 1320ms
memory: 3996kb
input:
-10000 -10000 10000 10000 2000 -413 9522 8730 4470 3507 9168 5383 8069 8670 4427 -9308 3173 7997 5312 4959 8042 9698 943 7838 5266 -1664 9690 -8665 4435 -7997 5929 -8004 5304 6458 7586 1075 9349 -9665 1477 -9045 3807 -2560 9625 -9175 3732 -2041 9416 4209 8993 -4289 8826 -9394 2481 9442 2659 9358 241...
output:
801988277.64484842389356344938
result:
ok found '801988277.6448485', expected '801988277.6448485', error '0.0000000'
Test #24:
score: 0
Accepted
time: 1279ms
memory: 3920kb
input:
-10000 -10000 10000 10000 2000 -8928 -3936 -6761 7287 -9682 -71 -8639 -3984 -9595 2735 293 9693 2163 9632 -8395 5266 69 9738 -7522 6527 -9270 -2254 1248 9688 -9575 -961 9627 1763 -9052 3587 -7114 6320 1541 9699 9483 1490 9715 929 9537 2145 9232 2774 -8662 4803 -2298 9383 -3408 8923 7113 6554 3071 91...
output:
876785969.03840659314300864935
result:
ok found '876785969.0384066', expected '876785969.0384066', error '0.0000000'
Test #25:
score: -100
Wrong Answer
time: 1276ms
memory: 4048kb
input:
-10000 -10000 10000 10000 2000 -9635 -653 -8720 -4280 -5995 7913 -9350 -2497 -5442 8109 -8247 -5020 -9214 3473 -9607 719 -9089 -3142 -9469 -1962 -9849 -106 9096 3352 -4680 -8597 9250 3140 9456 1742 -3524 8952 6527 7385 -1748 9791 -7220 -6715 9498 2723 4248 8776 -2148 9563 -8946 3525 -8594 -4460 -310...
output:
917966448.16235176764894276857
result:
wrong answer 1st numbers differ - expected: '917958796.4176416', found: '917966448.1623517', error = '0.0000083'