QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#826924 | #7916. Jogging Tour | Brno (Bocheng Jiang, Zhenyu Wang, Taixiang Wang)# | AC ✓ | 112ms | 4984kb | C++20 | 1.3kb | 2024-12-22 17:17:14 | 2024-12-22 17:17:14 |
Judging History
answer
#include<bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
const int N=16,M=160,INF=0x3f3f3f3f;
inline int max(int x,int y){return x>y?x:y;}
inline int min(int x,int y){return x<y?x:y;}
inline void swap(int &x,int &y){x^=y^=x^=y;}
int n;
ld ans=INF,g[N][N],f[1<<12][N];
struct node{
ld x,y;
ld mdis(node a){
return fabs(x-a.x)+fabs(y-a.y);
}
ld dist(node a){
return sqrt((x-a.x)*(x-a.x)+(y-a.y)*(y-a.y));
}
node rotate(ld sin,ld cos){//clockwise
return (node){x*cos+y*sin,-x*sin+y*cos};
}
}p[N],w[N];
ld dp(){
ld res=INF;
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
g[i-1][j-1]=i==j?INF:w[i].mdis(w[j]);
for(int S=0;S<1<<n;S++)
for(int i=0;i<n;i++)f[S][i]=INF;
for(int i=0;i<n;i++)f[1<<i][i]=0;
for(int S=1;S<1<<n;S++)
for(int i=0;i<n;i++)if(!((S>>i)&1))
for(int j=0;j<n;j++)if((S>>j)&1)
f[S|(1<<i)][i]=min(f[S|(1<<i)][i],f[S][j]+g[i][j]);
for(int i=0;i<n;i++)
res=min(res,f[(1<<n)-1][i]);
return res;
}
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%Lf%Lf",&p[i].x,&p[i].y);
for(int i=1;i<=n;i++)
for(int j=i+1;j<=n;j++){
ld r=p[i].dist(p[j]);
ld x=p[i].x-p[j].x;
ld y=p[i].y-p[j].y;
for(int k=1;k<=n;k++)
w[k]=p[k].rotate(y/r,x/r);
ans=std::min(ans,dp());
}
printf("%.15Lf",ans);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3944kb
input:
3 0 1 1 2 3 0
output:
4.242640687119285
result:
ok found '4.2426407', expected '4.2426407', error '0.0000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
4 1 4 6 0 5 3 2 6
output:
11.156638751671317
result:
ok found '11.1566388', expected '11.1566388', error '0.0000000'
Test #3:
score: 0
Accepted
time: 106ms
memory: 4924kb
input:
12 0 0 1000000 1000000 1000000 0 0 1000000 500000 0 500000 1000000 0 500000 1000000 500000 250000 250000 250000 750000 750000 250000 750000 750000
output:
4949747.468305832670467
result:
ok found '4949747.4683058', expected '4949747.4683058', error '0.0000000'
Test #4:
score: 0
Accepted
time: 111ms
memory: 4892kb
input:
12 500001 500000 500001 500001 500002 500001 500002 500002 500003 500002 500003 500003 500004 500003 500004 500004 500005 500004 500005 500005 500006 500005 500006 500006
output:
11.000000000000000
result:
ok found '11.0000000', expected '11.0000000', error '0.0000000'
Test #5:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 550000 500000 550000 550000 600000 550000 600000 600000 650000 600000 650000 650000 700000 650000 700000 700000 750000 700000 750000 750000 800000 750000 800000 800000
output:
550000.000000000000000
result:
ok found '550000.0000000', expected '550000.0000000', error '0.0000000'
Test #6:
score: 0
Accepted
time: 0ms
memory: 4024kb
input:
8 278212 792776 606731 148551 838562 642422 206606 720970 490169 867167 867254 505748 824701 671690 649948 164703
output:
1549478.196474442201179
result:
ok found '1549478.1964744', expected '1549478.1964744', error '0.0000000'
Test #7:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 711554 668522 799933 759541 618514 572703 629454 583969 784553 743701 688308 644581 671193 615834 713797 668145 785602 756310 819818 798322 665804 609218 653602 594235
output:
352852.774611854056019
result:
ok found '352852.7746119', expected '352852.7746119', error '0.0000000'
Test #8:
score: 0
Accepted
time: 111ms
memory: 4984kb
input:
12 530516 243189 733290 72252 472464 472546 464083 505660 651482 395466 721261 119776 541101 443380 566186 263726 730850 305404 504427 248095 268768 374451 448274 233882
output:
1404441.268007305043056
result:
ok found '1404441.2680073', expected '1404441.2680073', error '0.0000000'
Test #9:
score: 0
Accepted
time: 110ms
memory: 4856kb
input:
12 685942 510296 682791 362548 622916 504795 664949 360990 516137 348002 695581 363664 394131 414642 492612 331971 655439 583858 860728 411528 552887 281373 899739 378780
output:
1160127.697879161144442
result:
ok found '1160127.6978792', expected '1160127.6978792', error '0.0000000'
Test #10:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 671321 623090 808149 708553 762207 816934 507179 657642 510944 659994 878594 752554 672138 658709 634878 663122 538103 791598 563000 758545 834882 442655 714937 601890
output:
1255115.204323268588951
result:
ok found '1255115.2043233', expected '1255115.2043233', error '0.0000000'
Test #11:
score: 0
Accepted
time: 1ms
memory: 3904kb
input:
7 192572 368048 4869 388554 239063 400581 812279 470560 780716 741281 823653 518076 557419 482536
output:
1259323.421951723227153
result:
ok found '1259323.4219517', expected '1259323.4219517', error '0.0000000'
Test #12:
score: 0
Accepted
time: 40ms
memory: 4380kb
input:
11 853864 896320 106408 593454 204771 459160 5079 127798 888756 338318 495774 500469 145744 944258 460195 356358 297159 139794 422403 270301 458718 161069
output:
3226054.579069320026520
result:
ok found '3226054.5790693', expected '3226054.5790693', error '0.0000000'
Test #13:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
6 810632 76352 243377 385541 388761 178059 230235 667452 93049 222018 38351 950071
output:
1892324.029075860190915
result:
ok found '1892324.0290759', expected '1892324.0290759', error '0.0000000'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
2 336554 506039 185457 470827
output:
155145.700401267968886
result:
ok found '155145.7004013', expected '155145.7004013', error '0.0000000'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3908kb
input:
2 356809 558358 656554 187885
output:
476547.278613570512960
result:
ok found '476547.2786136', expected '476547.2786136', error '0.0000000'
Test #16:
score: 0
Accepted
time: 14ms
memory: 4160kb
input:
10 465031 718623 732809 636428 19395 494440 410592 215294 525737 105362 951270 98444 584773 449874 131298 856571 520267 209471 638631 939132
output:
3016163.406333370842276
result:
ok found '3016163.4063334', expected '3016163.4063334', error '0.0000000'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
5 705278 337992 753208 589847 680830 621516 300581 767195 877853 890592
output:
1382212.616187098655928
result:
ok found '1382212.6161871', expected '1382212.6161871', error '0.0000000'
Test #18:
score: 0
Accepted
time: 1ms
memory: 3920kb
input:
6 389016 751942 124337 996314 700289 100561 952576 573149 69836 958607 91358 431503
output:
2262275.389167978953765
result:
ok found '2262275.3891680', expected '2262275.3891680', error '0.0000000'
Test #19:
score: 0
Accepted
time: 14ms
memory: 4148kb
input:
10 408848 910714 317653 45436 831034 588590 612090 2727 488923 770989 334672 707768 534563 399148 432658 864664 657295 980235 866892 911292
output:
2624702.633639475973496
result:
ok found '2624702.6336395', expected '2624702.6336395', error '0.0000000'
Test #20:
score: 0
Accepted
time: 1ms
memory: 3904kb
input:
6 940988 450643 878159 431892 196142 753879 428068 272704 778673 630670 124817 404338
output:
1745951.627559967831871
result:
ok found '1745951.6275600', expected '1745951.6275600', error '0.0000000'
Test #21:
score: 0
Accepted
time: 1ms
memory: 3932kb
input:
8 756171 157 250232 662690 638163 54813 601098 66293 261749 474907 338844 955031 78196 765582 900791 652531
output:
2392010.839542341255310
result:
ok found '2392010.8395423', expected '2392010.8395423', error '0.0000000'
Test #22:
score: 0
Accepted
time: 2ms
memory: 4020kb
input:
9 722362 817024 955489 962653 571718 773273 271279 782034 764793 420692 437611 154993 773710 747775 88823 914099 365572 788790
output:
2423686.679518630749044
result:
ok found '2423686.6795186', expected '2423686.6795186', error '0.0000000'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
6 502781 751423 803984 11010 455813 415664 972027 669881 720491 49539 490300 656180
output:
1577710.545320642579782
result:
ok found '1577710.5453206', expected '1577710.5453206', error '0.0000000'
Test #24:
score: 0
Accepted
time: 14ms
memory: 4152kb
input:
10 716831 742724 416098 899988 114665 861682 786614 798424 332224 416588 120646 357538 192455 375012 777628 893487 175104 422698 158087 194856
output:
1995582.831507630626334
result:
ok found '1995582.8315076', expected '1995582.8315076', error '0.0000000'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
5 263067 207088 482847 938873 605571 401636 151058 67580 228542 743655
output:
1568226.350906814973769
result:
ok found '1568226.3509068', expected '1568226.3509068', error '0.0000000'
Test #26:
score: 0
Accepted
time: 14ms
memory: 4096kb
input:
10 746070 132591 214224 791126 134913 722000 203391 227639 194100 780835 895101 396941 289587 214071 432770 652084 398242 436911 161693 112249
output:
2246832.303689953501816
result:
ok found '2246832.3036900', expected '2246832.3036900', error '0.0000000'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
6 101834 946158 81940 753866 153608 195239 530790 448639 384289 78529 342743 544451
output:
1548917.183692140843618
result:
ok found '1548917.1836921', expected '1548917.1836921', error '0.0000000'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
4 57602 830261 854144 750508 685206 933626 191695 767539
output:
1059152.843647507562991
result:
ok found '1059152.8436475', expected '1059152.8436475', error '0.0000000'
Test #29:
score: 0
Accepted
time: 111ms
memory: 4912kb
input:
12 978167 794299 860900 843774 270708 368616 977305 523805 144911 824932 955897 568286 653815 52056 635431 179203 484955 416043 591222 213993 730658 876503 175666 273335
output:
2778995.355136651547127
result:
ok found '2778995.3551367', expected '2778995.3551367', error '0.0000000'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
3 677318 735997 688848 563195 329105 738432
output:
533676.729684764812419
result:
ok found '533676.7296848', expected '533676.7296848', error '0.0000000'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3976kb
input:
5 962340 239443 418884 935721 497268 991452 153915 756533 369990 218352
output:
1834857.747026076279894
result:
ok found '1834857.7470261', expected '1834857.7470261', error '0.0000000'
Test #32:
score: 0
Accepted
time: 110ms
memory: 4984kb
input:
12 499999 500000 499999 500001 499998 500001 499998 500002 499997 500002 499997 500003 499996 500003 499996 500004 499995 500004 499995 500005 499994 500005 499994 500006
output:
11.000000000000000
result:
ok found '11.0000000', expected '11.0000000', error '0.0000000'
Test #33:
score: 0
Accepted
time: 110ms
memory: 4948kb
input:
12 500001 500000 500001 499999 500002 499999 500002 499998 500003 499998 500003 499997 500004 499997 500004 499996 500005 499996 500005 499995 500006 499995 500006 499994
output:
11.000000000000000
result:
ok found '11.0000000', expected '11.0000000', error '0.0000000'
Test #34:
score: 0
Accepted
time: 106ms
memory: 4932kb
input:
12 499999 500000 499999 499999 499998 499999 499998 499998 499997 499998 499997 499997 499996 499997 499996 499996 499995 499996 499995 499995 499994 499995 499994 499994
output:
11.000000000000000
result:
ok found '11.0000000', expected '11.0000000', error '0.0000000'
Test #35:
score: 0
Accepted
time: 111ms
memory: 4856kb
input:
12 450000 500000 450000 550000 400000 550000 400000 600000 350000 600000 350000 650000 300000 650000 300000 700000 250000 700000 250000 750000 200000 750000 200000 800000
output:
550000.000000000000000
result:
ok found '550000.0000000', expected '550000.0000000', error '0.0000000'
Test #36:
score: 0
Accepted
time: 110ms
memory: 4916kb
input:
12 550000 500000 550000 450000 600000 450000 600000 400000 650000 400000 650000 350000 700000 350000 700000 300000 750000 300000 750000 250000 800000 250000 800000 200000
output:
550000.000000000000000
result:
ok found '550000.0000000', expected '550000.0000000', error '0.0000000'
Test #37:
score: 0
Accepted
time: 110ms
memory: 4980kb
input:
12 450000 500000 450000 450000 400000 450000 400000 400000 350000 400000 350000 350000 300000 350000 300000 300000 250000 300000 250000 250000 200000 250000 200000 200000
output:
550000.000000000000000
result:
ok found '550000.0000000', expected '550000.0000000', error '0.0000000'
Test #38:
score: 0
Accepted
time: 107ms
memory: 4912kb
input:
12 500000 500001 500000 500002 500000 500003 500000 500004 500000 500005 500000 500006 500000 500007 500000 500008 500000 500009 500000 500010 500000 500011 500000 500012
output:
11.000000000000000
result:
ok found '11.0000000', expected '11.0000000', error '0.0000000'
Test #39:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 500001 500000 500002 500000 500003 500000 500004 500000 500005 500000 500006 500000 500007 500000 500008 500000 500009 500000 500010 500000 500011 500000 500012 500000
output:
11.000000000000000
result:
ok found '11.0000000', expected '11.0000000', error '0.0000000'
Test #40:
score: 0
Accepted
time: 111ms
memory: 4928kb
input:
12 500000 505000 500000 510000 500000 515000 500000 520000 500000 525000 500000 530000 500000 535000 500000 540000 500000 545000 500000 550000 500000 555000 500000 560000
output:
55000.000000000000000
result:
ok found '55000.0000000', expected '55000.0000000', error '0.0000000'
Test #41:
score: 0
Accepted
time: 110ms
memory: 4920kb
input:
12 505000 500000 510000 500000 515000 500000 520000 500000 525000 500000 530000 500000 535000 500000 540000 500000 545000 500000 550000 500000 555000 500000 560000 500000
output:
55000.000000000000000
result:
ok found '55000.0000000', expected '55000.0000000', error '0.0000000'
Test #42:
score: 0
Accepted
time: 106ms
memory: 4908kb
input:
12 500123 500456 500246 500912 500369 501368 500492 501824 500615 502280 500738 502736 500861 503192 500984 503648 501107 504104 501230 504560 501353 505016 501476 505472
output:
5195.273332559125379
result:
ok found '5195.2733326', expected '5195.2733326', error '0.0000000'
Test #43:
score: 0
Accepted
time: 11ms
memory: 4144kb
input:
10 421497 529721 438975 557636 416413 492308 419721 475481 579178 472127 490350 583384 536641 424479 481925 418029 419638 475753 437933 556512
output:
416362.924446375343848
result:
ok found '416362.9244464', expected '416362.9244464', error '0.0000000'
Test #44:
score: 0
Accepted
time: 1ms
memory: 3960kb
input:
2 694656 772579 647585 800681
output:
54821.541796998011932
result:
ok found '54821.5417970', expected '54821.5417970', error '0.0000000'
Test #45:
score: 0
Accepted
time: 5ms
memory: 4032kb
input:
9 895707 360551 821333 769769 493854 919514 881488 325366 123914 314018 427769 86705 563445 85265 899470 628274 182514 225714
output:
2149079.516955133000465
result:
ok found '2149079.5169551', expected '2149079.5169551', error '0.0000000'
Test #46:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
6 494332 520399 500597 478837 510201 518552 482368 511719 487964 482583 506538 479863
output:
93267.493390951948498
result:
ok found '93267.4933910', expected '93267.4933910', error '0.0000000'
Test #47:
score: 0
Accepted
time: 5ms
memory: 4100kb
input:
9 337767 349277 652744 660332 416111 295061 358303 329826 457082 717245 531352 719213 282132 539635 697927 400692 720341 522069
output:
1268592.102085644471572
result:
ok found '1268592.1020856', expected '1268592.1020856', error '0.0000000'
Test #48:
score: 0
Accepted
time: 0ms
memory: 3960kb
input:
6 365434 617012 613945 362827 676962 522010 652905 408240 428506 336634 469628 675720
output:
876030.443694267727665
result:
ok found '876030.4436943', expected '876030.4436943', error '0.0000000'
Test #49:
score: 0
Accepted
time: 5ms
memory: 4016kb
input:
9 653695 475399 564588 358382 617557 602018 606090 613896 480935 345521 405794 376094 654349 520097 462017 349054 643413 560498
output:
569385.188791311965474
result:
ok found '569385.1887913', expected '569385.1887913', error '0.0000000'
Test #50:
score: 0
Accepted
time: 1ms
memory: 3996kb
input:
7 41287 326993 58415 287039 287344 941732 10568 471615 766131 88268 408053 18445 545491 988139
output:
2191697.469761596905983
result:
ok found '2191697.4697616', expected '2191697.4697616', error '0.0000000'
Test #51:
score: 0
Accepted
time: 1ms
memory: 3908kb
input:
7 320939 500423 475131 322674 676937 527503 511100 678717 350452 401519 673175 545534 325751 458764
output:
835775.343072722075362
result:
ok found '835775.3430727', expected '835775.3430727', error '0.0000000'
Test #52:
score: 0
Accepted
time: 2ms
memory: 4016kb
input:
9 720848 237342 623561 820150 442734 161645 686118 788311 209884 316709 830108 406236 173871 606785 644170 188587 182998 631426
output:
1920331.449595521595711
result:
ok found '1920331.4495955', expected '1920331.4495955', error '0.0000000'
Test #53:
score: 0
Accepted
time: 111ms
memory: 4912kb
input:
12 418518 673253 436377 641857 438755 637677 393214 717735 406685 694054 448766 620077 465095 756369 321195 643564 553455 825636 399131 704660 507212 789385 565891 835384
output:
526828.455082001710821
result:
ok found '526828.4550820', expected '526828.4550820', error '0.0000000'
Test #54:
score: 0
Accepted
time: 106ms
memory: 4908kb
input:
12 732234 616548 664155 635739 746127 612631 690903 628199 717405 620728 604119 652663 570734 659081 467366 724957 633046 619370 555691 668667 505459 700680 567648 661048
output:
375600.509844400149319
result:
ok found '375600.5098444', expected '375600.5098444', error '0.0000000'
Test #55:
score: 0
Accepted
time: 110ms
memory: 4964kb
input:
12 691373 435071 402051 396144 402681 396229 556300 416898 563484 417864 594683 422062 675413 448522 788138 488286 593347 419575 539878 400714 566996 410279 503773 387978
output:
495682.086356667334115
result:
ok found '495682.0863567', expected '495682.0863567', error '0.0000000'
Test #56:
score: 0
Accepted
time: 111ms
memory: 4908kb
input:
12 308167 681577 516661 608690 366549 661167 405943 647396 379078 656787 633275 567924 647245 699948 479134 538411 640271 693248 561984 618022 625195 678760 608365 662589
output:
740053.267578465863608
result:
ok found '740053.2675785', expected '740053.2675785', error '0.0000000'
Test #57:
score: 0
Accepted
time: 110ms
memory: 4892kb
input:
12 735225 652437 622404 669581 609331 671568 721100 654583 673018 661890 464528 693571 538388 761842 493875 468909 517995 627640 500569 512963 505165 543209 545204 806697
output:
802198.721917849738247
result:
ok found '802198.7219178', expected '802198.7219178', error '0.0000000'
Test #58:
score: 0
Accepted
time: 110ms
memory: 4984kb
input:
12 457716 416337 389335 302808 346292 231346 426163 363951 366584 265037 407604 333139 438899 385266 252797 497360 295152 471849 367894 428034 429308 391043 477901 361775
output:
560508.894294144429807
result:
ok found '560508.8942941', expected '560508.8942941', error '0.0000000'
Test #59:
score: 0
Accepted
time: 110ms
memory: 4912kb
input:
12 234198 650896 348619 690200 494264 740231 240774 653155 401032 708204 268562 662700 302472 656880 273921 739997 367339 468042 260634 778679 277850 728560 301465 659813
output:
782215.831750577145726
result:
ok found '782215.8317506', expected '782215.8317506', error '0.0000000'
Test #60:
score: 0
Accepted
time: 111ms
memory: 4892kb
input:
12 572166 727941 602534 713160 788802 622501 766473 633369 663422 683525 578306 724953 708894 588783 763703 780521 752007 739605 761898 774206 722479 636306 733145 673620
output:
594332.593925579129746
result:
ok found '594332.5939256', expected '594332.5939256', error '0.0000000'
Test #61:
score: 0
Accepted
time: 107ms
memory: 4920kb
input:
12 372944 768413 455202 833699 287258 700407 267376 684628 309059 717710 441322 822683 237349 795293 264093 762778 415859 578264 240737 791174 292791 727887 398656 599179
output:
676292.210717894324546
result:
ok found '676292.2107179', expected '676292.2107179', error '0.0000000'
Test #62:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 519220 632615 294612 775594 373340 725478 553152 611014 550074 612974 389127 715428 479033 670563 522919 739772 414524 568835 551869 785424 522480 739079 601786 864143
output:
861036.763801706748552
result:
ok found '861036.7638017', expected '861036.7638017', error '0.0000000'
Test #63:
score: 0
Accepted
time: 111ms
memory: 4864kb
input:
12 507237 338662 547924 367018 592514 398095 533377 356880 382638 251823 377715 248392 534013 345362 418476 511077 462904 447354 424312 502707 577602 282842 398147 540236
output:
739804.588419308154073
result:
ok found '739804.5884193', expected '739804.5884193', error '0.0000000'
Test #64:
score: 0
Accepted
time: 108ms
memory: 4856kb
input:
12 312526 456377 323426 316778 323984 309629 314610 429685 334452 175546 314851 426600 534457 284855 569027 287555 510562 282989 568250 287494 322605 268311 233413 261345
output:
805784.970779781184376
result:
ok found '805784.9707798', expected '805784.9707798', error '0.0000000'
Test #65:
score: 0
Accepted
time: 110ms
memory: 4904kb
input:
12 238400 586310 328939 540608 291191 559662 507976 450234 561062 423437 318367 545944 306544 451536 312845 464018 341968 521712 237887 315520 338088 514027 318467 475156
output:
724977.272331230263717
result:
ok found '724977.2723312', expected '724977.2723312', error '0.0000000'
Test #66:
score: 0
Accepted
time: 106ms
memory: 4960kb
input:
12 631493 567139 645888 577019 529534 497157 642612 574771 582039 533195 737661 640010 622262 739872 764908 532045 722815 593372 573702 810621 639071 715383 573615 810748
output:
733537.964617546646878
result:
ok found '733537.9646175', expected '733537.9646175', error '0.0000000'
Test #67:
score: 0
Accepted
time: 112ms
memory: 4952kb
input:
12 693974 682214 729535 846969 684341 637580 677276 604850 675874 598355 722510 814423 893962 614280 623522 672652 715511 652797 652726 666348 797196 635166 717523 652363
output:
659435.822342499398701
result:
ok found '659435.8223425', expected '659435.8223425', error '0.0000000'
Test #68:
score: 0
Accepted
time: 106ms
memory: 4912kb
input:
12 755596 616206 812112 594251 682961 644424 630206 664919 751254 617893 687106 642814 781440 776282 738131 664802 695055 553922 708824 589362 737328 662737 707722 586526
output:
608191.742882002589567
result:
ok found '608191.7428820', expected '608191.7428820', error '0.0000000'
Test #69:
score: 0
Accepted
time: 106ms
memory: 4968kb
input:
12 742138 381253 720708 381607 718211 381648 501417 385232 759993 380957 584454 383860 748864 207439 564181 398332 748614 207698 639591 320387 638477 321538 624976 335493
output:
590791.915424689106715
result:
ok found '590791.9154247', expected '590791.9154247', error '0.0000000'
Test #70:
score: 0
Accepted
time: 110ms
memory: 4928kb
input:
12 301278 575013 336473 569235 461467 548716 513310 540205 313063 573079 443389 551684 504254 378840 380903 550646 459743 440837 409886 510278 393294 533388 478088 415286
output:
531629.747999157181823
result:
ok found '531629.7479992', expected '531629.7479992', error '0.0000000'
Test #71:
score: 0
Accepted
time: 111ms
memory: 4904kb
input:
12 541331 357060 538409 350276 527154 324145 542279 359261 470669 193000 526758 323226 491441 351590 331832 288081 544138 372559 531695 367608 638628 410156 504661 356851
output:
633828.250935827209048
result:
ok found '633828.2509358', expected '633828.2509358', error '0.0000000'
Test #72:
score: 0
Accepted
time: 111ms
memory: 4816kb
input:
12 524435 252263 496388 393576 465136 551035 529974 224357 467049 541394 515637 296591 498569 302329 538279 361705 444808 221942 591323 441020 510716 320491 525898 343193
output:
692892.202785043067252
result:
ok found '692892.2027850', expected '692892.2027850', error '0.0000000'
Test #73:
score: 0
Accepted
time: 110ms
memory: 4928kb
input:
12 614328 538012 624644 534217 743870 490358 665418 519217 797942 470466 754428 486473 669665 510346 708547 426208 738907 360513 738538 361310 685996 475008 633526 588549
output:
527892.302331691908591
result:
ok found '527892.3023317', expected '527892.3023317', error '0.0000000'
Test #74:
score: 0
Accepted
time: 111ms
memory: 4924kb
input:
12 401353 364977 113898 264510 339487 343355 256554 314369 365682 352510 110394 263285 361433 297153 76278 434609 316377 318872 373754 291213 338413 308249 400899 278128
output:
724302.077346590847014
result:
ok found '724302.0773466', expected '724302.0773466', error '0.0000000'
Test #75:
score: 0
Accepted
time: 107ms
memory: 4928kb
input:
12 681803 574939 672303 533476 665005 501629 707760 688219 705320 677568 696663 639787 847330 658817 691815 561324 882772 681036 750421 598064 646226 532744 638275 527760
output:
584213.095833571577941
result:
ok found '584213.0958336', expected '584213.0958336', error '0.0000000'
Test #76:
score: 0
Accepted
time: 106ms
memory: 4860kb
input:
12 536445 665297 537379 661927 569608 545584 633127 316285 593880 457965 535254 669596 595477 422883 702751 611597 660227 536790 581480 398260 640900 502791 666097 547116
output:
746206.697613087183584
result:
ok found '746206.6976131', expected '746206.6976131', error '0.0000000'
Test #77:
score: 0
Accepted
time: 111ms
memory: 4920kb
input:
12 579748 432108 539169 648618 601948 313658 536243 664228 537732 656283 577331 445005 604314 452978 557108 386514 590037 432876 553364 381244 697666 584411 698377 585413
output:
625488.536266518918694
result:
ok found '625488.5362665', expected '625488.5362665', error '0.0000000'
Test #78:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 527918 737105 533997 738643 562655 687242 857531 561446 439557 656095 572704 689785 460837 764686 416513 678993 420204 664407 616163 605710 654352 454782 632666 540489
output:
877105.426962269264493
result:
ok found '877105.4269623', expected '877105.4269623', error '0.0000000'
Test #79:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 412420 713073 511423 338689 448182 230781 353205 724446 681990 305929 524465 336184 752820 463969 749481 446585 581280 376267 721179 299239 724239 315169 566250 298011
output:
1227631.817691312685611
result:
ok found '1227631.8176913', expected '1227631.8176913', error '0.0000000'
Test #80:
score: 0
Accepted
time: 111ms
memory: 4984kb
input:
12 650284 572721 716482 566201 384567 532878 786404 775311 626173 550166 696386 691098 643108 480752 566916 646366 704316 415324 782706 400465 492797 530865 656600 355770
output:
1451631.716759359518960
result:
ok found '1451631.7167594', expected '1451631.7167594', error '0.0000000'
Test #81:
score: 0
Accepted
time: 110ms
memory: 4856kb
input:
12 519880 476262 593427 546310 393012 454264 514376 709681 393453 435568 517414 580823 328475 458121 344223 702104 616280 601861 744807 604891 614249 613705 464333 610170
output:
1223098.280077198724484
result:
ok found '1223098.2800772', expected '1223098.2800772', error '0.0000000'
Test #82:
score: 0
Accepted
time: 110ms
memory: 4928kb
input:
12 484245 539629 161265 422242 179758 460198 570891 717469 551877 678443 191714 484739 105574 684850 358040 842465 362649 840318 540341 757550 643551 709476 181041 649698
output:
1398668.914784117116938
result:
ok found '1398668.9147841', expected '1398668.9147841', error '0.0000000'
Test #83:
score: 0
Accepted
time: 110ms
memory: 4928kb
input:
12 756797 439548 207726 645386 551549 703970 155711 712397 225376 622647 741110 459758 696874 542500 703709 548000 253056 524216 456722 688080 773872 604451 385274 630594
output:
1204258.828402808549527
result:
ok found '1204258.8284028', expected '1204258.8284028', error '0.0000000'
Test #84:
score: 0
Accepted
time: 106ms
memory: 4860kb
input:
12 980942 734898 824330 703985 622961 664239 330426 426808 797079 472685 641375 441952 362735 426310 570493 339042 593831 656578 603530 611588 571527 334241 720798 782679
output:
1542393.223161705355778
result:
ok found '1542393.2231617', expected '1542393.2231617', error '0.0000000'
Test #85:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 766900 307395 373475 564777 478877 560196 652926 721357 499545 430565 371782 619393 662981 818218 560273 540870 559953 528555 696197 121492 658498 645665 384441 484700
output:
1467067.295554364521536
result:
ok found '1467067.2955544', expected '1467067.2955544', error '0.0000000'
Test #86:
score: 0
Accepted
time: 110ms
memory: 4908kb
input:
12 274462 289347 732196 525239 279644 310583 252122 507704 333848 535513 323144 539460 230738 572738 273324 659832 590689 431656 713196 404013 411316 628695 302184 247974
output:
1420047.705393499622119
result:
ok found '1420047.7053935', expected '1420047.7053935', error '0.0000000'
Test #87:
score: 0
Accepted
time: 106ms
memory: 4864kb
input:
12 252272 709637 363953 519661 557539 45733 337056 565414 408960 298472 517446 732018 573098 615571 388646 93312 601671 725665 562766 575766 415887 198269 449917 329385
output:
1657784.605546203997847
result:
ok found '1657784.6055462', expected '1657784.6055462', error '0.0000000'
Test #88:
score: 0
Accepted
time: 110ms
memory: 4932kb
input:
12 505514 585211 728262 658934 666754 311866 724445 450131 264777 423831 577615 282365 751410 654324 466491 523657 461295 526269 595066 732913 547228 483073 545340 757908
output:
1495427.405496079533123
result:
ok found '1495427.4054961', expected '1495427.4054961', error '0.0000000'
Test #89:
score: 0
Accepted
time: 111ms
memory: 4924kb
input:
12 537593 307426 483428 605436 339117 549122 258596 447936 414142 401335 412866 330583 492510 487851 418473 533626 493697 479119 643739 633764 451206 292784 501099 424660
output:
1183671.285839657604811
result:
ok found '1183671.2858397', expected '1183671.2858397', error '0.0000000'
Test #90:
score: 0
Accepted
time: 106ms
memory: 4908kb
input:
12 608836 643869 648920 594585 452754 851928 488899 238759 608167 320407 562484 442096 507773 598252 676681 497127 681505 667635 496926 492878 503009 551976 675908 613264
output:
1419479.465679897771338
result:
ok found '1419479.4656799', expected '1419479.4656799', error '0.0000000'
Test #91:
score: 0
Accepted
time: 110ms
memory: 4912kb
input:
12 273430 706010 381022 544453 781074 348654 307507 654842 438089 458762 810875 303905 752751 291511 317469 699276 747798 368890 758718 198287 316904 708097 751459 311682
output:
1106621.189049468214534
result:
ok found '1106621.1890495', expected '1106621.1890495', error '0.0000000'
Test #92:
score: 0
Accepted
time: 110ms
memory: 4912kb
input:
12 468550 541265 667932 296686 628169 439741 693094 486420 644077 517597 704910 273166 737792 459004 585504 350887 545633 427340 779504 379017 569783 381032 475497 561830
output:
939374.552719330587820
result:
ok found '939374.5527193', expected '939374.5527193', error '0.0000000'
Test #93:
score: 0
Accepted
time: 107ms
memory: 4920kb
input:
12 341999 396058 596483 658480 425696 340629 410195 343237 833116 618672 287823 363822 512379 250642 469022 336912 626195 631519 459115 294626 585468 240753 514815 248630
output:
1189878.470755871989240
result:
ok found '1189878.4707559', expected '1189878.4707559', error '0.0000000'
Test #94:
score: 0
Accepted
time: 110ms
memory: 4924kb
input:
12 574001 450955 527570 399121 500034 636342 256064 725964 237035 704722 402445 615593 251689 723498 763124 446181 747393 502149 531586 685709 461649 408495 692374 484116
output:
1224205.325495324848021
result:
ok found '1224205.3254953', expected '1224205.3254953', error '0.0000000'
Test #95:
score: 0
Accepted
time: 110ms
memory: 4916kb
input:
12 353268 531710 521237 686339 423804 573249 528727 675999 487082 485896 199535 597135 652695 328017 258420 538466 528884 638542 457997 550981 541608 515813 471532 420428
output:
1150971.031602066297978
result:
ok found '1150971.0316021', expected '1150971.0316021', error '0.0000000'
Test #96:
score: 0
Accepted
time: 106ms
memory: 4928kb
input:
12 535540 513343 186779 555933 579399 462402 715807 246252 623604 353345 179323 564594 420914 478308 604995 342954 686790 377095 323243 378125 603087 291239 580938 268521
output:
1196543.469176350354815
result:
ok found '1196543.4691764', expected '1196543.4691764', error '0.0000000'
Test #97:
score: 0
Accepted
time: 106ms
memory: 4856kb
input:
12 663038 372506 568121 182326 574592 503333 360125 342147 285299 350298 529061 469114 600227 519959 500807 402009 433249 535305 586080 535710 683824 426877 650498 413322
output:
1228236.188148876640980
result:
ok found '1228236.1881489', expected '1228236.1881489', error '0.0000000'
Test #98:
score: 0
Accepted
time: 110ms
memory: 4856kb
input:
12 432463 426338 332779 490444 503082 557294 359083 580577 500102 461886 467949 489646 515560 367329 227504 499256 446350 644859 263750 473864 375903 547206 363470 612096
output:
906208.769549229379152
result:
ok found '906208.7695492', expected '906208.7695492', error '0.0000000'
Test #99:
score: 0
Accepted
time: 110ms
memory: 4920kb
input:
12 519692 323632 664490 617537 258834 410515 678187 492478 624400 553376 406754 344350 336920 648536 657096 581036 461792 406870 385831 623616 231828 524037 427418 424383
output:
1306139.956761255634206
result:
ok found '1306139.9567613', expected '1306139.9567613', error '0.0000000'
Test #100:
score: 0
Accepted
time: 2ms
memory: 4024kb
input:
9 5 0 5 1 5 2 5 3 5 4 3 2 4 2 6 2 7 2
output:
12.000000000000000
result:
ok found '12.0000000', expected '12.0000000', error '0.0000000'
Test #101:
score: 0
Accepted
time: 1ms
memory: 3960kb
input:
3 218526 516531 78726 616462 271908 262284
output:
502598.365711286778435
result:
ok found '502598.3657113', expected '502598.3657113', error '0.0000000'
Test #102:
score: 0
Accepted
time: 1ms
memory: 3840kb
input:
3 719469 692553 574141 782394 320480 730251
output:
500489.761244793577049
result:
ok found '500489.7612448', expected '500489.7612448', error '0.0000000'
Test #103:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
3 285071 201200 361047 793804 676205 976434
output:
1108054.228309306833239
result:
ok found '1108054.2283093', expected '1108054.2283093', error '0.0000000'
Test #104:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
3 150435 744155 438336 925272 974137 748377
output:
1043097.325629662484175
result:
ok found '1043097.3256297', expected '1043097.3256297', error '0.0000000'
Test #105:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
2 0 0 0 1
output:
1.000000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #106:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
2 4 5 5 4
output:
1.414213562373095
result:
ok found '1.4142136', expected '1.4142136', error '0.0000000'
Test #107:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
2 4 4 5 6
output:
2.236067977499790
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #108:
score: 0
Accepted
time: 0ms
memory: 3960kb
input:
3 0 0 5 5 0 10
output:
14.142135623730950
result:
ok found '14.1421356', expected '14.1421356', error '0.0000000'
Test #109:
score: 0
Accepted
time: 0ms
memory: 3908kb
input:
3 1 0 10 1 9 10
output:
18.110770276274833
result:
ok found '18.1107703', expected '18.1107703', error '0.0000000'
Test #110:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
4 1 0 10 1 9 10 0 9
output:
27.166155414412250
result:
ok found '27.1661554', expected '27.1661554', error '0.0000000'
Test #111:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
4 1 0 10 2 9 10 0 9
output:
26.282703205813478
result:
ok found '26.2827032', expected '26.2827032', error '0.0000000'
Test #112:
score: 0
Accepted
time: 0ms
memory: 3908kb
input:
3 1 0 10 2 9 10
output:
18.005227998948462
result:
ok found '18.0052280', expected '18.0052280', error '0.0000000'
Test #113:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
3 1 0 10 1 10 10
output:
18.994222484873606
result:
ok found '18.9942225', expected '18.9942225', error '0.0000000'