QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#363581#7515. Discrete Fourier TransformDelay_for_five_minutes#AC ✓98ms4116kbC++201.2kb2024-03-24 00:30:252024-03-24 00:30:26

Judging History

你现在查看的是最新测评结果

  • [2024-03-24 00:30:26]
  • 评测
  • 测评结果:AC
  • 用时:98ms
  • 内存:4116kb
  • [2024-03-24 00:30:25]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;

const int N=2003;
const double pi=3.141592653589793;
int n,k,a[N];
struct vec{
    long double x,y;
    vec(){}
    vec(double x,double y):x(x),y(y){}
    vec operator+(const vec& p)const{
        return vec(x+p.x,y+p.y);
    }
    vec operator-(const vec& p)const{
        return vec(x-p.x,y-p.y);
    }
    vec operator*(const double& v)const{
        return vec(x*v,y*v);
    }
}f[N];

bool chk(long double x){
    long double l=-1e9,r=1e9;
    for(int i=0;i<n;++i){
        if(x<fabs(f[i].y))return 0;
        l=max(l,f[i].x-sqrt(x*x-f[i].y*f[i].y));
        r=min(r,f[i].x+sqrt(x*x-f[i].y*f[i].y));
    }
    return floor(l)<floor(r);
}

int main(){
    ios::sync_with_stdio(0);cin.tie(0);
    cin>>n>>k;
    for(int i=0;i<n;++i)cin>>a[(i-k+n)%n];
    for(int i=0;i<n;++i)
        for(int j=1;j<n;++j)
            f[i]=f[i]+vec(a[j]*cos(-2*pi*i*j/n),a[j]*sin(-2*pi*i*j/n));
    long double l=0,r=4e6;
    while(r-l>1e-12){
        long double mid=(l+r)/2;
        if(chk(mid))r=mid;
        else l=mid;
    }
    cout<<fixed<<setprecision(12)<<l<<'\n';
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 4056kb

input:

3 2
1 1 0

output:

1.999999999999

result:

ok found '2.000000000', expected '2.000000000', error '0.000000000'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

1 0
1000

output:

0.000000000000

result:

ok found '0.000000000', expected '0.000000000', error '-0.000000000'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

2 1
-1000 1000

output:

999.999999999999

result:

ok found '1000.000000000', expected '1000.000000000', error '0.000000000'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3884kb

input:

2 0
1000 1000

output:

999.999999999999

result:

ok found '1000.000000000', expected '1000.000000000', error '0.000000000'

Test #5:

score: 0
Accepted
time: 93ms
memory: 4016kb

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.000000126411

result:

ok found '1999000.000000126', expected '1999000.000000000', error '0.000000000'

Test #6:

score: 0
Accepted
time: 85ms
memory: 4080kb

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.000000126411

result:

ok found '1999000.000000126', expected '1999000.000000000', error '0.000000000'

Test #7:

score: 0
Accepted
time: 92ms
memory: 4032kb

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.000000145920

result:

ok found '2000000.000000146', expected '2000000.000000000', error '0.000000000'

Test #8:

score: 0
Accepted
time: 82ms
memory: 3964kb

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.000000145920

result:

ok found '2000000.000000146', expected '2000000.000000000', error '0.000000000'

Test #9:

score: 0
Accepted
time: 81ms
memory: 4080kb

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.000000086528

result:

ok found '1186000.000000087', expected '1186000.000000000', error '0.000000000'

Test #10:

score: 0
Accepted
time: 90ms
memory: 3952kb

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.000000053391

result:

ok found '729500.000000053', expected '729500.000000000', error '0.000000000'

Test #11:

score: 0
Accepted
time: 85ms
memory: 4032kb

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.213572971571

result:

ok found '1873935.213572972', expected '1873935.213572497', error '0.000000000'

Test #12:

score: 0
Accepted
time: 93ms
memory: 4024kb

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.000000056927

result:

ok found '1440500.000000057', expected '1440500.000000000', error '0.000000000'

Test #13:

score: 0
Accepted
time: 86ms
memory: 4012kb

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.000000115841

result:

ok found '1075400.000000116', expected '1075400.000000000', error '0.000000000'

Test #14:

score: 0
Accepted
time: 85ms
memory: 4084kb

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.483270516417

result:

ok found '1356739.483270516', expected '1356739.483270508', error '0.000000000'

Test #15:

score: 0
Accepted
time: 87ms
memory: 3952kb

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.242035338279

result:

ok found '712209.242035338', expected '712209.242035304', error '0.000000000'

Test #16:

score: 0
Accepted
time: 85ms
memory: 4056kb

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.521981462717

result:

ok found '606505.521981463', expected '606505.521981463', error '0.000000000'

Test #17:

score: 0
Accepted
time: 85ms
memory: 4028kb

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.274085729056

result:

ok found '418141.274085729', expected '418141.274085721', error '0.000000000'

Test #18:

score: 0
Accepted
time: 85ms
memory: 4036kb

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.247901019240

result:

ok found '319903.247901019', expected '319903.247900997', error '0.000000000'

Test #19:

score: 0
Accepted
time: 85ms
memory: 4088kb

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.666222844032

result:

ok found '215914.666222844', expected '215914.666222833', error '0.000000000'

Test #20:

score: 0
Accepted
time: 98ms
memory: 4060kb

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.858015287651

result:

ok found '216873.858015288', expected '216873.858015251', error '0.000000000'

Test #21:

score: 0
Accepted
time: 23ms
memory: 4096kb

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.548938500299

result:

ok found '100204.548938500', expected '100204.548938496', error '0.000000000'

Test #22:

score: 0
Accepted
time: 13ms
memory: 4048kb

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.628022517216

result:

ok found '67304.628022517', expected '67304.628022516', error '0.000000000'

Test #23:

score: 0
Accepted
time: 9ms
memory: 4008kb

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.737007265403

result:

ok found '70354.737007265', expected '70354.737007264', error '0.000000000'

Test #24:

score: 0
Accepted
time: 3ms
memory: 3892kb

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.538674616791

result:

ok found '52651.538674617', expected '52651.538674615', error '0.000000000'

Test #25:

score: 0
Accepted
time: 85ms
memory: 4080kb

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.417001372508

result:

ok found '134797.417001372', expected '134797.417001370', error '0.000000000'

Test #26:

score: 0
Accepted
time: 88ms
memory: 3892kb

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.639692675392

result:

ok found '141445.639692675', expected '141445.639692671', error '0.000000000'

Test #27:

score: 0
Accepted
time: 88ms
memory: 4064kb

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.888695978015

result:

ok found '130813.888695978', expected '130813.888695954', error '0.000000000'

Test #28:

score: 0
Accepted
time: 81ms
memory: 4084kb

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.815214875414

result:

ok found '126327.815214875', expected '126327.815214871', error '0.000000000'

Test #29:

score: 0
Accepted
time: 85ms
memory: 4064kb

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.343274304293

result:

ok found '135388.343274304', expected '135388.343274304', error '0.000000000'

Test #30:

score: 0
Accepted
time: 85ms
memory: 4040kb

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.731356758965

result:

ok found '122662.731356759', expected '122662.731356748', error '0.000000000'

Test #31:

score: 0
Accepted
time: 88ms
memory: 4080kb

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.145874197048

result:

ok found '132077.145874197', expected '132077.145874187', error '0.000000000'

Test #32:

score: 0
Accepted
time: 82ms
memory: 3856kb

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.948470641232

result:

ok found '132516.948470641', expected '132516.948470628', error '0.000000000'

Test #33:

score: 0
Accepted
time: 85ms
memory: 4008kb

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.482307609807

result:

ok found '140752.482307610', expected '140752.482307603', error '0.000000000'

Test #34:

score: 0
Accepted
time: 81ms
memory: 4060kb

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:

722404.999999999999

result:

ok found '722405.000000000', expected '722405.000000000', error '0.000000000'

Test #35:

score: 0
Accepted
time: 85ms
memory: 4028kb

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.000000000000

result:

ok found '1054694.000000000', expected '1054694.000000000', error '0.000000000'

Test #36:

score: 0
Accepted
time: 86ms
memory: 4068kb

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.698647823601

result:

ok found '1448965.698647824', expected '1448965.698647805', error '0.000000000'

Test #37:

score: 0
Accepted
time: 85ms
memory: 4028kb

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.474684090858

result:

ok found '1693946.474684091', expected '1693946.474684088', error '0.000000000'

Test #38:

score: 0
Accepted
time: 85ms
memory: 4040kb

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.834703130339

result:

ok found '1828553.834703130', expected '1828553.834703128', error '0.000000000'

Test #39:

score: 0
Accepted
time: 81ms
memory: 4116kb

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.000000000000

result:

ok found '1925691.000000000', expected '1925691.000000000', error '0.000000000'

Test #40:

score: 0
Accepted
time: 85ms
memory: 4040kb

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.000000000000

result:

ok found '1960992.000000000', expected '1960992.000000000', error '0.000000000'

Test #41:

score: 0
Accepted
time: 87ms
memory: 4068kb

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.742487394430

result:

ok found '131687.742487394', expected '131687.742487388', error '0.000000000'

Test #42:

score: 0
Accepted
time: 85ms
memory: 3940kb

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.114945783732

result:

ok found '699405.114945784', expected '699405.114945776', error '0.000000000'

Test #43:

score: 0
Accepted
time: 93ms
memory: 4056kb

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.225865223066

result:

ok found '1067800.225865223', expected '1067800.225865223', error '0.000000000'

Test #44:

score: 0
Accepted
time: 85ms
memory: 4024kb

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.000000000000

result:

ok found '1458384.000000000', expected '1458384.000000000', error '0.000000000'

Test #45:

score: 0
Accepted
time: 92ms
memory: 4024kb

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.747201366986

result:

ok found '1676052.747201367', expected '1676052.747201366', error '0.000000000'

Test #46:

score: 0
Accepted
time: 81ms
memory: 4012kb

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.000000000000

result:

ok found '1824409.000000000', expected '1824409.000000000', error '0.000000000'

Test #47:

score: 0
Accepted
time: 86ms
memory: 3812kb

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.000000000000

result:

ok found '1927297.000000000', expected '1927297.000000000', error '0.000000000'

Test #48:

score: 0
Accepted
time: 82ms
memory: 4012kb

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.387274667693

result:

ok found '1961582.387274668', expected '1961582.387274662', error '0.000000000'

Test #49:

score: 0
Accepted
time: 85ms
memory: 4056kb

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.323819695832

result:

ok found '137917.323819696', expected '137917.323819695', error '0.000000000'

Test #50:

score: 0
Accepted
time: 85ms
memory: 4040kb

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.000000000000

result:

ok found '681145.000000000', expected '681145.000000000', error '0.000000000'

Test #51:

score: 0
Accepted
time: 86ms
memory: 4040kb

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:

1048150.999999999999

result:

ok found '1048151.000000000', expected '1048151.000000000', error '0.000000000'

Test #52:

score: 0
Accepted
time: 90ms
memory: 3920kb

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.000000000000

result:

ok found '1461719.000000000', expected '1461719.000000000', error '0.000000000'

Test #53:

score: 0
Accepted
time: 85ms
memory: 4084kb

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.000000000000

result:

ok found '1682324.000000000', expected '1682324.000000000', error '0.000000000'

Test #54:

score: 0
Accepted
time: 85ms
memory: 4056kb

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.000000000000

result:

ok found '1823535.000000000', expected '1823535.000000000', error '0.000000000'

Test #55:

score: 0
Accepted
time: 85ms
memory: 4024kb

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.912803065289

result:

ok found '1927240.912803065', expected '1927240.912803051', error '0.000000000'

Test #56:

score: 0
Accepted
time: 81ms
memory: 4116kb

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.000000000000

result:

ok found '1964037.000000000', expected '1964037.000000000', error '0.000000000'