QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#193482 | #7515. Discrete Fourier Transform | ucup-team896# | AC ✓ | 238ms | 21028kb | C++14 | 2.4kb | 2023-09-30 17:15:12 | 2023-09-30 17:15:12 |
Judging History
answer
#include <bits/stdc++.h>
#ifdef dbg
#define D(...) fprintf(stderr, __VA_ARGS__)
#define DD(...) D(#__VA_ARGS__ " = "), debug_helper::debug(__VA_ARGS__), D("\n")
#include "C:\Users\wsyear\Desktop\OI\templates\debug.hpp"
#else
#define D(...) ((void)0)
#define DD(...) ((void)0)
#endif
#define rep(i, j, k) for (int i = (j); i <= (k); ++i)
#define per(i, j, k) for (int i = (j); i >= (k); --i)
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
using ll = long long;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;
using namespace std;
#define double long double
const double PI = acos(-1.0);
struct Complex {
double x, y, kx, ky;
Complex(double _x = 0.0, double _y = 0.0, double _kx = 0.0, double _ky = 0.0) {
x = _x, y = _y, kx = _kx, ky = _ky;
}
Complex operator-(const Complex &b) const {
return Complex(x - b.x, y - b.y, kx - b.kx, ky - b.ky);
}
Complex operator+(const Complex &b) const {
return Complex(x + b.x, y + b.y, kx + b.kx, ky + b.ky);
}
Complex operator*(const Complex &b) const {
assert(fabs(kx) < 1e-9 && fabs(ky) < 1e-9);
return Complex(x * b.x - y * b.y, x * b.y + y * b.x, x * b.kx - y * b.ky, y * b.kx + x * b.ky);
}
};
const int N = 100010;
int n, m, k, len, a[N];
Complex b[N], c[N];
double C[N], B[N], A[N];
double calc(double x) {
double mx = 0;
rep (i, 0, n - 1) mx = max(mx, x * x * A[i] + x * B[i] + C[i]);
return mx;
}
int main() {
cout << fixed << setprecision(10);
cin >> n >> k;
rep (i, 0, n - 1) cin >> a[i];
rep (i, 0, n - 1) b[i] = Complex(a[i], 0, 0, 0);
b[k] = Complex(0, 0, 1, 0);
rep (i, 0, n - 1) {
c[i] = Complex(0, 0, 0, 0);
rep (s, 0, n - 1) {
double coe = -2 * PI * i * s / n;
c[i] = c[i] + Complex(cos(coe), sin(coe), 0, 0) * b[s];
}
}
rep (i, 0, n - 1) {
b[i] = c[i];
C[i] = b[i].x * b[i].x + b[i].y * b[i].y;
B[i] = 2. * (b[i].x * b[i].kx + b[i].y * b[i].ky);
A[i] = b[i].kx * b[i].kx + b[i].ky * b[i].ky;
}
ll l = -1e15, r = 1e15;
double ans = 1e100;
while (r - l + 1 > 5) {
ll mid1 = l + (r - l + 1) / 3;
ll mid2 = r - (r - l + 1) / 3;
double res1 = calc(mid1), res2 = calc(mid2);
ans = min(ans, min(res1, res2));
if (res1 <= res2) r = mid2;
else l = mid1;
}
rep (i, l, r) ans = min(ans, calc(i));
cout << sqrtl(ans) << '\n';
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 19696kb
input:
3 2 1 1 0
output:
2.0000000000
result:
ok found '2.000000000', expected '2.000000000', error '0.000000000'
Test #2:
score: 0
Accepted
time: 5ms
memory: 20748kb
input:
1 0 1000
output:
0.0000000000
result:
ok found '0.000000000', expected '0.000000000', error '-0.000000000'
Test #3:
score: 0
Accepted
time: 2ms
memory: 20280kb
input:
2 1 -1000 1000
output:
1000.0000000000
result:
ok found '1000.000000000', expected '1000.000000000', error '0.000000000'
Test #4:
score: 0
Accepted
time: 2ms
memory: 20320kb
input:
2 0 1000 1000
output:
1000.0000000000
result:
ok found '1000.000000000', expected '1000.000000000', error '0.000000000'
Test #5:
score: 0
Accepted
time: 237ms
memory: 20304kb
input:
1999 49 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 20...
output:
1999000.0000000162
result:
ok found '1999000.000000016', expected '1999000.000000000', error '0.000000000'
Test #6:
score: 0
Accepted
time: 233ms
memory: 19224kb
input:
1999 1502 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2...
output:
1999000.0000001557
result:
ok found '1999000.000000156', expected '1999000.000000000', error '0.000000000'
Test #7:
score: 0
Accepted
time: 234ms
memory: 19376kb
input:
2000 1477 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 ...
output:
2000000.0000001544
result:
ok found '2000000.000000154', expected '2000000.000000000', error '0.000000000'
Test #8:
score: 0
Accepted
time: 238ms
memory: 20888kb
input:
2000 449 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -2000 -20...
output:
2000000.0000001482
result:
ok found '2000000.000000148', expected '2000000.000000000', error '0.000000000'
Test #9:
score: 0
Accepted
time: 230ms
memory: 19148kb
input:
2000 1618 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1186 -1...
output:
1186000.0000000680
result:
ok found '1186000.000000068', expected '1186000.000000000', error '0.000000000'
Test #10:
score: 0
Accepted
time: 233ms
memory: 20312kb
input:
2000 1421 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92 1367 92...
output:
729500.0000000500
result:
ok found '729500.000000050', expected '729500.000000000', error '0.000000000'
Test #11:
score: 0
Accepted
time: 233ms
memory: 20264kb
input:
1998 1066 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1454 1755 1795 -1...
output:
1873935.2135725031
result:
ok found '1873935.213572503', expected '1873935.213572497', error '0.000000000'
Test #12:
score: 0
Accepted
time: 237ms
memory: 20316kb
input:
2000 822 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1738 1570 70 -1311 -1...
output:
1440500.0000000099
result:
ok found '1440500.000000010', expected '1440500.000000000', error '0.000000000'
Test #13:
score: 0
Accepted
time: 233ms
memory: 20808kb
input:
2000 1748 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1987 1351 932 -33 1140 1...
output:
1075400.0000000492
result:
ok found '1075400.000000049', expected '1075400.000000000', error '0.000000000'
Test #14:
score: 0
Accepted
time: 233ms
memory: 20120kb
input:
2000 1563 1118 691 1082 895 -686 -1573 -1273 -1924 -1764 -1476 1118 691 1082 895 -686 -1573 -1273 -1924 -1764 -1476 1118 691 1082 895 -686 -1573 -1273 -1924 -1764 -1476 1118 691 1082 895 -686 -1573 -1273 -1924 -1764 -1476 1118 691 1082 895 -686 -1573 -1273 -1924 -1764 -1476 1118 691 1082 895 -686 -1...
output:
1356739.4832705469
result:
ok found '1356739.483270547', expected '1356739.483270508', error '0.000000000'
Test #15:
score: 0
Accepted
time: 233ms
memory: 19444kb
input:
2000 706 402 1049 -1710 1020 1236 468 1253 433 1693 777 509 -439 -1377 -1034 -780 1257 667 -1166 1831 -1185 402 1049 -1710 1020 1236 468 1253 433 1693 777 509 -439 -1377 -1034 -780 1257 667 -1166 1831 -1185 402 1049 -1710 1020 1236 468 1253 433 1693 777 509 -439 -1377 -1034 -780 1257 667 -1166 1831 ...
output:
712209.2420353147
result:
ok found '712209.242035315', expected '712209.242035304', error '0.000000000'
Test #16:
score: 0
Accepted
time: 237ms
memory: 20264kb
input:
2000 1596 -57 -1009 382 1118 -1634 492 -691 -717 1622 565 -1747 276 -1201 -662 -1664 -451 1223 -1303 842 1927 1050 -310 810 1798 971 -1620 417 -1948 1358 1985 1763 1803 -1098 -183 917 1160 -1036 -1772 -1780 -156 -1922 -56 1057 -1997 -414 1090 -403 1231 -1163 172 -57 -1009 382 1118 -1634 492 -691 -71...
output:
606505.5219814643
result:
ok found '606505.521981464', expected '606505.521981463', error '0.000000000'
Test #17:
score: 0
Accepted
time: 238ms
memory: 19588kb
input:
2000 869 -1372 -1006 -717 -566 -761 915 -1843 789 -269 -1004 1323 701 -829 -1114 -278 -702 -60 -1726 -853 -1601 -39 1173 1912 1333 1218 -115 1527 1194 914 -1270 -822 1075 1953 803 -707 -426 1706 -1011 452 -869 628 -1045 937 -1749 -1600 1636 140 -877 993 -1328 1333 -883 -681 -961 -398 1903 671 698 -1...
output:
418141.2740857233
result:
ok found '418141.274085723', expected '418141.274085721', error '0.000000000'
Test #18:
score: 0
Accepted
time: 234ms
memory: 19136kb
input:
2000 1742 250 1359 1973 351 615 -1382 516 -1287 345 -1717 203 -808 -272 212 -1915 -1768 -835 -1652 1919 1114 1949 -1309 249 -745 -1876 1805 -126 1725 542 503 -44 302 -1967 -1992 -1515 -808 806 701 -175 1949 -232 -1088 1865 171 -615 1390 -965 -1630 1934 -123 850 -798 -593 -924 1197 -1768 -1399 -136 -...
output:
319903.2479009975
result:
ok found '319903.247900998', expected '319903.247900997', error '0.000000000'
Test #19:
score: 0
Accepted
time: 237ms
memory: 19328kb
input:
2000 413 -1104 -1998 495 1449 1498 1508 294 1960 1198 833 -432 1717 1064 -1000 -1659 -579 164 1441 -1901 706 -1759 79 65 -1912 1671 -1866 -349 -1827 1476 1120 -539 1967 759 377 285 1933 -1025 80 111 553 1422 -215 1901 1019 -1405 860 -1055 1097 1948 -1232 -1868 -268 -981 -1560 -1615 -250 963 494 -170...
output:
215914.6662228343
result:
ok found '215914.666222834', expected '215914.666222833', error '0.000000000'
Test #20:
score: 0
Accepted
time: 234ms
memory: 20444kb
input:
2000 364 143 505 1587 -1276 1779 840 -443 220 -1557 491 1795 1704 -1290 481 1888 -168 -1704 610 -1120 -9 -1140 990 -260 -1121 -1476 1046 1319 1551 -1165 776 1078 -1805 -401 882 1150 -530 -770 -583 1773 -570 -513 -1204 978 -523 -734 724 1256 1452 1169 654 -1743 -879 -674 -815 -1866 -1810 965 1496 185...
output:
216873.8580152539
result:
ok found '216873.858015254', expected '216873.858015251', error '0.000000000'
Test #21:
score: 0
Accepted
time: 62ms
memory: 19048kb
input:
1024 349 -1627 -1238 1987 -1944 -1209 712 219 701 -57 -1156 -1078 -776 -60 -1089 -1307 -1251 234 28 -1525 1825 -445 1077 -1508 62 269 -843 -1127 -591 -241 -684 474 -1312 1130 427 -1855 1260 -543 334 1829 -23 -495 1963 -736 486 1753 19 -186 -43 575 -660 1858 -1452 -378 1890 854 -1233 1116 1098 -483 6...
output:
100204.5489384976
result:
ok found '100204.548938498', expected '100204.548938496', error '0.000000000'
Test #22:
score: 0
Accepted
time: 36ms
memory: 20984kb
input:
729 577 -1850 -1531 1407 -1949 -361 1261 764 1083 -977 -1899 -1316 -1388 781 273 -1690 546 1757 -488 -535 -478 1218 -437 29 -1258 -1356 1431 -1439 -50 -728 1528 1258 -220 -41 -265 339 1418 352 -372 321 -226 -49 -1358 -288 -1561 473 -580 -296 -676 1932 -276 1903 360 1795 869 102 -1524 1980 1302 -589 ...
output:
67304.6280225160
result:
ok found '67304.628022516', expected '67304.628022516', error '0.000000000'
Test #23:
score: 0
Accepted
time: 24ms
memory: 19368kb
input:
625 317 38 -99 1210 747 1217 261 -671 147 1740 -154 -1730 1629 347 995 -639 -244 950 410 -256 -497 -552 1209 -1517 775 -513 1650 585 1937 452 -1384 -652 767 -1290 952 1692 1447 -234 -1575 1087 -1975 -818 -1545 -251 -958 800 1123 1133 -1427 -304 1527 -1496 -1065 -1950 -233 -1550 568 -1540 1322 1363 -...
output:
70354.7370072657
result:
ok found '70354.737007266', expected '70354.737007264', error '0.000000000'
Test #24:
score: 0
Accepted
time: 12ms
memory: 19420kb
input:
343 90 965 -1814 -1087 -317 622 1575 -1437 -1957 -43 -1815 -1899 1636 1948 -528 -377 994 1160 -722 -1493 -968 771 -1914 -99 1388 100 -302 -1814 94 -1960 -781 184 -1427 -1433 22 -1519 -462 408 -319 -1217 176 -1970 -309 1126 1641 1700 1831 160 -1964 -584 1141 1352 -1390 -1608 576 670 1060 1008 -1011 1...
output:
52651.5386746152
result:
ok found '52651.538674615', expected '52651.538674615', error '0.000000000'
Test #25:
score: 0
Accepted
time: 227ms
memory: 20588kb
input:
1990 1692 1224 -1265 -1379 1369 -885 929 -1775 830 287 -127 -803 -1070 -758 1788 886 1148 -981 1204 1494 1116 -784 674 217 412 -77 -916 -1584 1617 -1404 -354 1612 1507 2000 1032 -844 -553 -659 -286 1478 -1067 951 1117 -262 731 1578 1285 692 278 -1669 1396 590 -1853 -1239 -259 -1186 -1040 50 1852 -14...
output:
134797.4170013731
result:
ok found '134797.417001373', expected '134797.417001370', error '0.000000000'
Test #26:
score: 0
Accepted
time: 231ms
memory: 20644kb
input:
1991 1303 -75 128 107 -1635 -808 -663 341 -892 -1653 428 -1938 53 -892 -1720 770 -810 -1571 -356 -1165 -1544 1569 -1407 -513 -1647 -347 -1624 1921 -1592 -1442 315 583 1390 25 162 303 1710 -1513 1548 389 1537 -545 452 -776 -1159 -1495 1326 -1170 -501 348 -562 -1241 910 -1431 -1150 -1766 -1465 20 -715...
output:
141445.6396926713
result:
ok found '141445.639692671', expected '141445.639692671', error '0.000000000'
Test #27:
score: 0
Accepted
time: 236ms
memory: 19816kb
input:
1992 1151 1538 1521 -1319 -638 -731 1745 1368 -1525 1496 984 928 1176 -1027 -139 1744 -1678 752 -1916 178 -1291 -79 -576 1669 295 -1706 579 1424 -800 -1479 -1928 -446 -1640 -1951 -708 362 -29 1635 469 -701 1229 -953 -1301 -1289 -136 -1656 278 969 1632 -1636 -1431 929 761 -1622 1961 1656 -1891 1080 1...
output:
130813.8886959544
result:
ok found '130813.888695954', expected '130813.888695954', error '0.000000000'
Test #28:
score: 0
Accepted
time: 236ms
memory: 20176kb
input:
1993 437 238 -1086 167 358 -655 153 -517 1843 -444 1539 882 -1702 -73 354 1629 366 162 525 1520 -1038 -638 1345 939 -1765 -1976 -129 927 1081 -1517 -171 -1475 -669 75 -1578 1510 -1767 781 -609 -1791 -168 -1360 946 -714 1976 -728 319 -892 -236 381 611 -1991 612 -725 1070 -13 -1228 -1862 -760 1851 387...
output:
126327.8152148821
result:
ok found '126327.815214882', expected '126327.815214871', error '0.000000000'
Test #29:
score: 0
Accepted
time: 236ms
memory: 20656kb
input:
1994 933 1851 307 -1259 1355 -578 -1439 1599 1210 1617 1006 -253 -1668 -208 1935 1513 -1592 -1516 53 -1138 304 1716 -1825 -880 177 666 -837 1520 1873 -466 498 1497 302 -1900 1553 1568 496 1017 1225 1120 -1565 1144 281 -1227 -1002 -889 360 1247 -1014 -1603 -258 179 463 -916 180 -593 -1653 -803 1763 -...
output:
135388.3432743057
result:
ok found '135388.343274306', expected '135388.343274304', error '0.000000000'
Test #30:
score: 0
Accepted
time: 237ms
memory: 19776kb
input:
1995 1704 551 1700 227 -1649 -501 969 -1375 577 766 1561 -1389 -545 -343 -1573 1398 1541 806 -1507 205 557 68 -994 -1610 -1882 -693 1366 1023 -1336 -504 -1745 -621 184 1214 1772 -1285 -1242 163 147 30 1039 737 -1473 -652 1109 40 402 -615 1119 1503 -1127 -1651 -776 -18 -711 -1173 1922 -832 -804 -318 ...
output:
122662.7313567496
result:
ok found '122662.731356750', expected '122662.731356748', error '0.000000000'
Test #31:
score: 0
Accepted
time: 229ms
memory: 19864kb
input:
1996 406 -1837 -907 -1199 -653 -424 -623 742 -56 -1174 -1884 1477 579 611 8 1282 -417 217 934 1547 1898 -1580 926 572 60 -963 658 526 545 -541 13 -1650 1155 -761 902 -138 1021 -690 -932 -1060 -358 -759 775 -1165 -1869 968 443 1524 340 -481 916 -570 -925 -210 -1601 -1753 1497 227 1718 53 595 -994 178...
output:
132077.1458741885
result:
ok found '132077.145874189', expected '132077.145874187', error '0.000000000'
Test #32:
score: 0
Accepted
time: 236ms
memory: 20368kb
input:
1997 1122 -224 486 287 344 -348 1786 -1143 -688 1975 -1329 1431 1702 476 501 1167 -1285 -1462 -626 -1111 -1850 773 1757 -157 -1999 1679 -1140 30 1337 -579 682 1321 -1874 1265 32 -79 -717 -455 902 -1061 -1756 -1167 110 -1679 243 807 484 -338 -1528 1536 46 1600 -1074 -401 1509 1669 -1841 1286 -849 151...
output:
132516.9484706302
result:
ok found '132516.948470630', expected '132516.948470628', error '0.000000000'
Test #33:
score: 0
Accepted
time: 232ms
memory: 19192kb
input:
1998 1675 -1524 1880 1773 1341 -271 193 -116 -1321 35 -773 296 -1176 341 -1919 1052 758 1950 1815 231 -508 215 -324 -1976 -57 320 -1848 -467 -1872 -617 -1562 292 -903 -711 -838 1069 1546 -1308 -176 1850 848 -1574 -1644 -1103 1266 1735 525 1801 605 -448 -1912 -231 1689 496 619 1089 1734 -1655 1674 18...
output:
140752.4823076040
result:
ok found '140752.482307604', expected '140752.482307603', error '0.000000000'
Test #34:
score: 0
Accepted
time: 233ms
memory: 20808kb
input:
1998 1164 1852 -1420 1721 993 545 1909 -922 1128 1182 -620 799 435 1294 1856 726 -72 1472 837 616 1813 1398 1484 1794 948 692 1024 -17 1776 484 -100 1478 950 -1724 1340 814 1057 1710 1517 845 -1588 160 -1919 -433 1676 1304 1064 -1566 1097 -760 661 1470 1380 1521 -758 615 -339 1792 -587 443 567 1734 ...
output:
722405.0000000000
result:
ok found '722405.000000000', expected '722405.000000000', error '0.000000000'
Test #35:
score: 0
Accepted
time: 233ms
memory: 19500kb
input:
1998 573 1226 1997 1054 1610 401 1575 1945 1922 1266 98 1848 129 1775 369 614 1050 1866 -248 1856 1939 1943 608 561 883 -1383 1394 646 1994 884 1728 557 1621 1813 1911 -356 1876 1435 1491 1714 1505 1551 594 864 853 656 1614 1946 134 1712 1831 603 99 1619 1760 -286 -1652 1146 1281 347 1513 1915 1550 ...
output:
1054694.0000000000
result:
ok found '1054694.000000000', expected '1054694.000000000', error '0.000000000'
Test #36:
score: 0
Accepted
time: 233ms
memory: 20448kb
input:
1998 1439 1245 1790 799 1671 1880 1464 1961 1294 997 1426 1389 1646 1560 1955 1272 1703 1270 1796 1547 644 1964 1785 -26 985 381 1852 1846 1393 1574 1686 1953 1714 667 1761 1739 1542 1394 1392 829 1707 1023 1309 1603 1791 1926 1336 1585 308 1575 1431 1150 1653 1685 1853 1387 1358 1748 1793 1860 1711...
output:
1448965.6986478049
result:
ok found '1448965.698647805', expected '1448965.698647805', error '0.000000000'
Test #37:
score: 0
Accepted
time: 237ms
memory: 20944kb
input:
1998 1188 1665 1373 1800 1117 1852 1530 1814 1769 1847 1975 1767 1777 1953 1658 1777 1865 1156 1646 1952 1642 1624 1835 1594 1895 1736 1858 1732 1740 1807 1865 1535 1763 1885 1363 1648 1940 1994 1823 1025 1648 1676 1994 2000 1727 2000 1109 1331 1923 1927 1973 943 1780 1047 1546 1617 1854 1945 1234 1...
output:
1693946.4746840884
result:
ok found '1693946.474684088', expected '1693946.474684088', error '0.000000000'
Test #38:
score: 0
Accepted
time: 233ms
memory: 20748kb
input:
1998 1336 1992 1866 1884 1832 1968 1466 1937 1875 1987 1730 1950 1996 1904 1622 1857 1953 1843 1806 1944 1909 1710 1816 1914 1931 1548 1961 1998 1849 1831 1693 1908 1927 1939 1777 1732 1916 1698 1934 1830 1963 1886 1102 1700 1695 1947 1981 1999 1976 1950 1991 1994 1625 1992 1954 1925 1873 1982 1717 ...
output:
1828553.8347031289
result:
ok found '1828553.834703129', expected '1828553.834703128', error '0.000000000'
Test #39:
score: 0
Accepted
time: 234ms
memory: 19180kb
input:
1998 175 1980 1855 1983 1969 1953 1755 1877 1702 1973 1966 1926 1988 1952 1873 1984 1992 1813 1948 2000 1914 1958 1951 1960 1861 1986 1995 1939 1939 1925 1967 1952 1901 1959 1993 1840 1977 1902 2000 1992 1928 1897 1908 1671 1744 1912 1789 1985 1982 1887 1940 1789 1943 1956 2000 1911 1968 1791 1993 1...
output:
1925691.0000000000
result:
ok found '1925691.000000000', expected '1925691.000000000', error '0.000000000'
Test #40:
score: 0
Accepted
time: 235ms
memory: 21028kb
input:
1998 1444 1952 1942 2000 1919 1993 1886 1949 1928 1978 1995 1971 1988 1996 1989 1924 1976 1882 1941 1984 1883 1997 1928 1995 1969 1984 1997 1948 1984 1977 1998 1947 1981 1940 1976 1934 1947 1978 1962 1992 1978 1993 2000 1986 1950 1924 1959 1900 1985 1984 1985 1948 1920 2000 1942 1974 1855 1990 1993 ...
output:
1960992.0000000000
result:
ok found '1960992.000000000', expected '1960992.000000000', error '0.000000000'
Test #41:
score: 0
Accepted
time: 238ms
memory: 19208kb
input:
1999 1410 89 -728 347 -1664 895 -1399 2000 958 -1905 -1307 -839 -53 1296 -1426 936 -110 271 1344 1574 -255 -1433 507 1295 1884 50 1444 -963 -1080 435 196 -737 -1021 1315 -1708 1127 -193 1839 -1254 761 -549 930 603 -1617 -624 1574 567 -1150 -173 1569 1220 850 1540 305 -272 509 1309 -596 -894 -657 189...
output:
131687.7424873886
result:
ok found '131687.742487389', expected '131687.742487388', error '0.000000000'
Test #42:
score: 0
Accepted
time: 237ms
memory: 20320kb
input:
1999 494 985 66 1798 -892 361 1340 -429 -1702 -378 723 1630 1160 -65 1359 1777 1616 1323 857 1343 723 1575 409 -1172 1660 479 443 1840 1350 1239 1360 -599 1980 505 1329 1547 240 1355 1339 1656 1748 -347 1269 661 1314 1561 1904 1514 1101 -68 -744 -751 178 738 669 1816 899 -1031 1320 -500 1366 -781 12...
output:
699405.1149457785
result:
ok found '699405.114945779', expected '699405.114945776', error '0.000000000'
Test #43:
score: 0
Accepted
time: 233ms
memory: 19500kb
input:
1999 913 1609 735 217 939 1356 706 856 -43 770 1791 1730 -502 846 1878 1637 1091 36 367 1391 461 330 1089 -150 1522 875 1938 1509 1180 492 1786 1858 1798 1416 1969 -94 1926 1898 1580 878 1829 1184 868 1319 1700 579 1451 450 1790 1945 -97 767 -560 1899 583 1622 484 1992 1854 1431 760 1747 1425 1578 1...
output:
1067800.2258652241
result:
ok found '1067800.225865224', expected '1067800.225865223', error '0.000000000'
Test #44:
score: 0
Accepted
time: 233ms
memory: 19548kb
input:
1999 691 1420 1731 1761 1982 1837 1088 1661 1598 1725 1515 1750 1239 1693 915 1905 1709 1872 172 1374 1540 1337 1070 355 1905 1316 804 1110 1548 1901 1749 1939 982 1102 1457 1616 1863 201 517 1760 305 1859 1719 980 1792 1959 1792 1969 643 1960 1955 1303 789 1493 1313 880 1741 1664 1677 1666 1098 198...
output:
1458384.0000000000
result:
ok found '1458384.000000000', expected '1458384.000000000', error '0.000000000'
Test #45:
score: 0
Accepted
time: 233ms
memory: 20816kb
input:
1999 521 1828 1845 554 1830 1999 1796 1274 1959 1412 1665 1310 1949 1375 1660 1816 1172 1776 1832 1181 1964 1665 1937 1892 1418 1761 1953 1086 1897 1460 1851 1869 1327 2000 1694 1071 1652 1676 1141 1989 1127 1684 1608 1529 1856 1801 1124 1893 1323 1008 1811 1766 1335 1670 845 1815 1934 1923 1774 160...
output:
1676052.7472013662
result:
ok found '1676052.747201366', expected '1676052.747201366', error '0.000000000'
Test #46:
score: 0
Accepted
time: 234ms
memory: 20264kb
input:
1999 14 1796 1968 1953 1702 1936 1387 1783 1850 1865 1938 1842 1352 1975 1831 1804 1831 1973 1883 1889 1835 1993 1858 1841 1992 1960 1794 1318 1804 1852 1754 1986 1959 1550 1886 1521 1427 1356 1970 1817 1764 1988 1775 1613 1851 1825 1735 1914 1736 1737 1829 1489 1933 1976 1997 1923 1830 1801 1960 17...
output:
1824409.0000000000
result:
ok found '1824409.000000000', expected '1824409.000000000', error '0.000000000'
Test #47:
score: 0
Accepted
time: 237ms
memory: 20352kb
input:
1999 572 1985 1810 1983 1953 1914 1992 1975 1938 1992 1812 1988 1991 1864 1944 1945 1966 1906 1958 1971 1924 1995 1811 1943 1949 1923 1966 1936 1977 1987 1978 1966 1883 1886 1938 1979 1940 1933 1963 1821 1903 1908 1815 1949 1990 1966 1970 1928 1970 1811 1962 1853 1988 1891 1950 1976 1963 1993 1847 1...
output:
1927297.0000000000
result:
ok found '1927297.000000000', expected '1927297.000000000', error '0.000000000'
Test #48:
score: 0
Accepted
time: 233ms
memory: 20316kb
input:
1999 514 1987 1958 1986 1975 1879 1963 1965 1982 1977 1898 2000 1919 2000 2000 1797 1984 1980 1975 1991 1986 1951 1989 1991 1978 1956 1953 1923 1969 1910 1972 1995 1961 1989 1957 1937 1997 1981 1971 1985 2000 1972 2000 1917 1999 1984 1993 1983 1910 1874 1956 1944 1958 1809 1951 1995 1992 1966 1992 1...
output:
1961582.3872746624
result:
ok found '1961582.387274662', expected '1961582.387274662', error '0.000000000'
Test #49:
score: 0
Accepted
time: 234ms
memory: 20860kb
input:
2000 224 -42 1207 -629 33 -53 1998 -1334 1977 -1375 -154 1709 -1113 -640 1317 -669 1098 141 847 1433 1201 246 1855 1909 -1483 -1177 1123 -56 1112 277 1459 -45 -99 -58 759 -1870 -261 -1459 -494 -773 -1046 -159 -335 48 -410 -1731 1593 -1876 -615 -1903 1553 1676 -1052 654 758 -1455 -1278 -1918 1744 164...
output:
137917.3238196962
result:
ok found '137917.323819696', expected '137917.323819695', error '0.000000000'
Test #50:
score: 0
Accepted
time: 234ms
memory: 20624kb
input:
2000 1339 1831 1232 1939 6 1514 1369 1935 -494 214 668 1889 1775 -834 640 1620 1822 -788 772 298 -377 1724 -1280 944 1272 1008 1269 1781 -1237 -124 -343 826 668 167 1537 1844 771 75 358 109 -136 -702 1216 1173 962 1035 -704 -767 -1867 -564 1947 704 1423 -652 401 -967 -1620 -251 -1257 101 1646 1068 7...
output:
681145.0000000000
result:
ok found '681145.000000000', expected '681145.000000000', error '0.000000000'
Test #51:
score: 0
Accepted
time: 230ms
memory: 20424kb
input:
2000 261 -457 -199 947 -1239 573 1915 1977 591 1677 -920 1394 1234 1549 1607 1851 1230 861 716 1271 1674 1947 -222 -1405 1711 962 1186 1247 1427 1773 344 942 1671 921 1839 1585 1455 644 1128 1389 1496 1900 1848 1720 1083 1934 1735 1754 1501 -537 1511 504 1232 1330 1966 1635 1053 1268 1945 -72 1670 1...
output:
1048151.0000000000
result:
ok found '1048151.000000000', expected '1048151.000000000', error '0.000000000'
Test #52:
score: 0
Accepted
time: 238ms
memory: 20648kb
input:
2000 1606 1919 1172 1684 1912 1989 807 1609 1994 650 1840 1446 1919 1969 1951 1615 1266 1913 1417 1575 1954 1341 1960 594 1336 1907 56 1852 1436 1880 677 1064 1829 1172 1427 1963 1411 1437 1910 1274 362 1315 1543 1702 1663 1736 1820 1342 1794 531 1995 928 1802 1987 1527 1803 1814 1968 1904 1460 1900...
output:
1461719.0000000000
result:
ok found '1461719.000000000', expected '1461719.000000000', error '0.000000000'
Test #53:
score: 0
Accepted
time: 229ms
memory: 19320kb
input:
2000 1102 1819 1730 1746 1534 1939 1989 1837 1991 1995 1597 1911 1834 1826 1023 1913 1903 1675 1152 1838 1875 1962 1905 1635 1641 1179 1751 1979 1992 1451 1318 1932 1296 1755 1935 1739 1304 1994 1519 1882 1620 1914 1913 1936 1804 1802 1764 1536 1647 1052 1941 1844 1520 1385 1941 1730 1822 1784 1503 ...
output:
1682324.0000000000
result:
ok found '1682324.000000000', expected '1682324.000000000', error '0.000000000'
Test #54:
score: 0
Accepted
time: 235ms
memory: 19268kb
input:
2000 1946 1894 1971 1347 1903 1373 1961 1831 1738 1953 1929 1856 1910 1902 1859 1968 1913 1824 1930 1838 1880 1827 1615 1873 1796 1510 1985 1690 1974 1958 1887 1825 1242 1748 1762 1564 1778 1997 1901 1975 1957 1713 1657 1976 1770 1986 1960 1981 1666 1855 1946 1733 1571 1606 1522 1928 1932 1888 1817 ...
output:
1823535.0000000000
result:
ok found '1823535.000000000', expected '1823535.000000000', error '0.000000000'
Test #55:
score: 0
Accepted
time: 238ms
memory: 19740kb
input:
2000 479 1902 1916 1791 1887 1808 1970 1934 1958 1954 1946 1683 1938 1850 1931 1769 1942 1846 1702 1934 1906 1997 1979 1903 1826 1953 1993 1997 1940 1944 1949 1945 1964 1968 1979 1824 1984 1896 1889 1736 1981 1988 1588 1907 1984 1809 1907 1956 1948 1856 1956 1938 1943 1851 1988 1993 1993 1935 1966 1...
output:
1927240.9128030508
result:
ok found '1927240.912803051', expected '1927240.912803051', error '0.000000000'
Test #56:
score: 0
Accepted
time: 230ms
memory: 19664kb
input:
2000 259 1970 1999 1991 1995 2000 1997 1948 1951 1953 1950 1910 1953 2000 1986 1982 1990 1998 1953 1984 1994 1970 1985 1995 1960 1974 1970 1910 1967 1967 2000 1985 1977 1982 1908 1992 2000 1799 1895 1939 1981 1885 1978 1997 1995 1990 1934 1976 1941 1961 1953 1994 1981 1996 1991 1987 1978 1935 1928 1...
output:
1964037.0000000000
result:
ok found '1964037.000000000', expected '1964037.000000000', error '0.000000000'