QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#48803#4568. Budget DistributionlarryzhongAC ✓505ms22448kbC++171.8kb2022-09-16 01:40:422022-09-16 01:40:44

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3744kb

input:

1 5
3 1 7 10 700 400 100
0 2 10 50 102

output:

1.055555556
0.866666667
0.547619048
0.127450980
0.000000000

result:

ok 5 numbers

Test #2:

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

input:

2 5
3 10 70 100 700 400 100
3 10 30 100 700 400 100
2 10 50 70 110

output:

2.296703297
2.216776341
1.869016736
1.730158730
1.527131783

result:

ok 5 numbers

Test #3:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

10 10
2 33942 868 371 78
2 76858 41608 333 100
2 6654 20321 170 203
2 2620 63358 632 53
2 93065 61561 594 212
2 57474 542 813 559
2 40721 17760 290 976
2 46703 85826 255 366
2 46854 97247 875 814
2 86728 83989 602 306
201032820943 922351084935 360042197511 441040805811 822857993607 196200869890 4856...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000

result:

ok 10 numbers

Test #4:

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

input:

10 10
2 96134 53888 702 380
2 13325 18733 529 846
2 88540 54362 938 703
2 8808 55334 591 19
2 44013 54721 319 891
2 83136 55364 214 73
2 20391 6867 838 8
2 26623 38206 497 763
2 17952 8445 377 586
2 44642 45084 728 45
79 70 52 33 63 42 12 63 43 19

output:

4.470926408
4.471387543
4.472310755
4.473286621
4.471746421
4.472824194
4.474366843
4.471746421
4.472772832
4.474006578

result:

ok 10 numbers

Test #5:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

10 10
2 87040 85595 968 661
2 30804 2371 595 360
2 67653 67814 918 546
2 41321 35253 782 456
2 87902 48810 187 121
2 42170 84373 530 949
2 50987 54778 671 987
2 14728 42286 11 621
2 58533 75318 331 777
2 16391 57471 903 6
59864 120 8708 29592 32313 33728 70753 22703 10343 23788

output:

2.603437800
3.802300656
3.422887535
2.960168133
2.920269830
2.900461223
2.498443288
3.073271492
3.367622792
3.054187598

result:

ok 10 numbers

Test #6:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

10 10
2 55721 79321 580 343
2 95806 49722 805 940
2 78827 17939 667 94
2 6559 95072 787 101
2 94219 75884 552 449
2 30793 62126 870 399
2 85442 23970 408 302
2 1278 2598 862 62
2 31318 32132 323 412
2 58132 71731 139 922
3906840 989184 7399265 8741239 2517664 9283266 5589494 6287477 4787549 4589132

output:

0.000000000
0.225625565
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000

result:

ok 10 numbers

Test #7:

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

input:

10 1000
2 77028 12264 551 939
2 78089 30777 523 797
2 52960 82253 148 858
2 31700 74778 830 751
2 82878 16882 965 56
2 45145 65715 165 802
2 45515 12564 949 925
2 74172 24959 285 684
2 82124 35743 748 30
2 57875 4015 855 611
735264331681 371600467165 94562142784 569058824359 478028793676 54038716428...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #8:

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

input:

10 1000
2 3938 22415 871 82
2 27631 97743 165 825
2 65967 18034 62 901
2 32242 10555 911 686
2 8940 50904 300 731
2 68995 92862 315 731
2 88209 67039 379 38
2 21342 97668 185 932
2 87548 79592 402 31
2 58250 93518 738 332
1 95 82 41 37 90 75 42 76 12 57 100 26 41 85 6 15 37 34 61 42 51 69 5 14 30 76...

output:

6.107398514
6.101352666
6.102186232
6.104820549
6.105077994
6.101673171
6.102635415
6.104756200
6.102571231
6.106688794
6.103791550
6.101032282
6.105786370
6.104820549
6.101993798
6.107075840
6.106495337
6.105077994
6.105271129
6.103534495
6.104756200
6.104177278
6.103020618
6.107140365
6.106559817
...

result:

ok 1000 numbers

Test #9:

score: 0
Accepted
time: 2ms
memory: 3708kb

input:

10 1000
2 5140 93191 993 507
2 49021 71125 253 668
2 54110 90050 237 705
2 14347 68749 921 989
2 90266 34358 823 341
2 75716 40108 379 298
2 75242 1960 390 505
2 82368 59940 873 599
2 80119 25572 458 269
2 77505 23084 473 542
13582 50935 29056 56674 60779 57858 54777 64188 71802 62584 98903 19513 26...

output:

4.253146705
3.624599720
3.973118475
3.540167270
3.481169296
3.523037341
3.567817026
3.432902505
3.327312730
3.455535246
2.974620988
4.142132694
4.024662553
3.142588132
3.749926239
3.272440212
4.213535664
3.618474599
3.677094846
4.439706687
3.610445611
3.836404386
3.580597361
3.668911222
4.112194102
...

result:

ok 1000 numbers

Test #10:

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

input:

10 1000
2 63317 53050 130 281
2 64560 28892 410 881
2 1063 11155 826 49
2 40055 59506 424 645
2 12471 7521 963 271
2 19232 77975 924 545
2 99920 71689 222 682
2 94741 8756 840 370
2 48868 73259 816 882
2 66849 33301 483 146
9873316 4084979 2160366 7640555 1658999 4484798 3942725 8537680 7071378 1801...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
1.779665204
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
3.013462758
...

result:

ok 1000 numbers

Test #11:

score: 0
Accepted
time: 158ms
memory: 10208kb

input:

10 300000
2 80591 44947 481 327
2 75950 2449 866 938
2 99608 77677 797 190
2 58139 15935 651 10
2 44816 33174 358 436
2 38004 26636 226 565
2 469 38698 415 136
2 42979 87602 981 867
2 60596 22147 89 853
2 48278 17909 953 392
692991526086 159941543361 696799547314 839250682232 929834822694 5575324243...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 300000 numbers

Test #12:

score: 0
Accepted
time: 156ms
memory: 10340kb

input:

10 300000
2 14727 60185 203 943
2 957 83853 755 274
2 34549 74057 591 60
2 36606 42995 780 234
2 99519 45408 758 164
2 90464 79714 893 283
2 10282 71750 94 219
2 36569 58396 705 759
2 43097 68284 739 347
2 92033 75118 481 318
161797 388092 583550 632465 602460 390359 708606 645995 802797 718316 6441...

output:

3.230396809
1.911486491
1.177541779
1.029368022
1.118816969
1.901442888
0.823546842
0.990641682
0.607069720
0.799282600
0.995804891
4.057560392
0.284563474
5.128153517
4.079379345
4.079482516
1.093636154
0.682490713
0.504959253
0.732684630
0.737826341
4.158416230
4.247725294
1.248126783
0.310741744
...

result:

ok 300000 numbers

Test #13:

score: 0
Accepted
time: 153ms
memory: 10296kb

input:

10 300000
2 24657 78396 784 707
2 82124 78980 350 675
2 49942 96873 793 420
2 51590 81596 443 843
2 95550 24127 983 681
2 58878 89659 891 881
2 13331 4486 344 639
2 40425 42504 785 234
2 79181 50756 130 948
2 18402 76432 814 229
9082979 7690187 3589112 3211595 8594440 3257496 1723111 3336064 9781022...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.013876850
0.195010219
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 300000 numbers

Test #14:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

10 10
5 52610 28731 22847 35575 92477 123 900 153 973 448
5 79020 21023 59748 35335 70749 982 566 736 644 781
5 12526 77062 53974 90431 44804 346 958 583 184 581
3 80317 48431 45398 740 307 120
3 68944 27423 17637 905 271 444
2 43575 34316 375 221
5 49626 4091 68522 85021 46323 526 728 120 156 10
3 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000

result:

ok 10 numbers

Test #15:

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

input:

10 10
4 65110 95449 82698 71008 894 648 27 228
5 60011 10464 57083 68265 68445 36 90 754 229 247
3 21233 63487 79092 912 892 495
4 4035 24700 13745 33736 266 456 164 626
4 27592 83673 71525 32997 202 865 529 751
4 26109 14552 17478 72487 443 788 339 241
5 37454 13011 7612 9873 80264 117 650 120 349 ...

output:

6.689345075
6.691032085
6.691454308
6.690684514
6.689444227
6.691503994
6.689989753
6.689890543
6.690907938
6.690138587

result:

ok 10 numbers

Test #16:

score: 0
Accepted
time: 2ms
memory: 3684kb

input:

10 10
3 9723 45483 41663 180 412 187
4 97649 15044 76931 1479 971 143 884 205
4 98370 39080 92343 85645 864 528 311 139
3 87812 41408 3618 520 439 162
4 57153 91809 20722 52851 904 299 271 644
2 94086 60318 194 512
2 46688 66547 603 750
4 44879 94379 75684 3996 260 291 680 444
4 94896 69948 61990 90...

output:

4.062859719
3.617201124
3.408142996
3.310524627
4.594719658
3.775273289
3.579016362
3.895206128
3.301373559
3.337516658

result:

ok 10 numbers

Test #17:

score: 0
Accepted
time: 2ms
memory: 3744kb

input:

10 10
4 15609 65721 77099 1645 403 541 288 785
4 44486 61984 94869 40006 68 826 483 561
3 28190 3593 87641 8 570 561
2 55124 97214 146 846
5 78455 77453 36526 32533 89431 704 182 808 163 167
3 85119 41444 46422 289 157 887
5 78190 8611 92893 60931 69904 332 580 194 151 778
4 68482 41077 79758 39706 ...

output:

0.001359522
0.209376470
1.437850995
0.023374384
0.030492231
0.048515910
0.006165005
1.772841665
0.717942035
0.760415339

result:

ok 10 numbers

Test #18:

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

input:

10 1000
3 98857 46905 48686 222 634 335
4 95418 14008 68547 90033 749 869 494 849
4 6152 32171 54190 98101 313 223 685 17
5 23928 41942 49688 26798 16050 245 922 330 731 978
5 4485 53360 81073 78705 83422 438 155 989 720 906
4 5745 17815 55961 23066 370 607 561 340
3 75189 75062 1657 742 843 70
2 27...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #19:

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

input:

10 1000
2 98267 69661 589 273
3 70747 34816 70253 546 949 873
2 47435 94946 490 355
3 61549 40110 24381 963 983 422
2 98028 48962 376 672
5 9351 67283 26704 76201 87921 580 938 70 688 339
2 52842 51624 495 729
4 47695 32102 50092 21172 722 198 57 107
5 18679 37632 55787 63933 77463 455 836 217 188 3...

output:

4.672127245
4.672872978
4.672364926
4.672829725
4.672829725
4.672851351
4.672851351
4.672440570
4.672505413
4.672105642
4.672105642
4.672981123
4.672570263
4.672840538
4.672732415
4.672991939
4.672364926
4.672591881
4.672364926
4.672192059
4.672386538
4.672202862
4.672624310
4.672624310
4.672548646
...

result:

ok 1000 numbers

Test #20:

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

input:

10 1000
2 6799 39344 364 707
2 21377 26908 660 54
4 35458 88922 81786 81556 329 925 772 410
5 40965 18428 95181 48238 18322 395 164 843 477 826
5 76116 34444 24971 19277 1071 882 414 315 29 140
3 7302 29915 55237 538 970 505
4 94740 6056 69454 12775 429 971 234 617
4 61028 28738 81858 7554 487 199 2...

output:

4.802604677
5.329928629
5.066843565
5.793312920
5.049165546
5.606186698
5.394056838
5.405994214
5.295257793
5.087799347
5.074346440
4.874874849
5.047507040
5.271335366
6.151676769
5.402818707
5.087716909
5.540975037
6.195298483
4.871047926
4.959554598
5.169411474
5.476854573
5.370265482
5.018807688
...

result:

ok 1000 numbers

Test #21:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

10 1000
4 9470 97718 45626 90814 297 342 594 796
4 54273 99935 5000 36382 488 728 886 700
4 7703 15452 73294 49935 241 542 332 263
5 59748 81651 87470 32404 45271 698 371 461 215 197
3 54659 93335 63302 716 487 255
4 88462 47791 98874 89496 898 790 982 999
2 79129 486 203 72
4 81139 5321 83671 2050 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.382189369
0.004353482
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.045277848
0.000000000
1.237711520
0.000000000
0.247928057
1.976135997
0.396948282
0.000000000
0.000000000
0.851956808
0.394533725
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #22:

score: 0
Accepted
time: 160ms
memory: 10300kb

input:

10 300000
2 32856 36826 318 704
2 22612 24781 268 229
3 75564 78094 35035 408 98 67
5 61112 71175 5065 72192 91429 651 388 723 655 328
3 14292 33117 73323 719 53 549
4 97674 16169 71135 32705 470 129 938 789
3 13520 42886 69152 794 487 249
5 93676 44922 58923 50471 12587 24 497 36 119 623
2 35576 17...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 300000 numbers

Test #23:

score: 0
Accepted
time: 152ms
memory: 10316kb

input:

10 300000
5 69763 68588 37790 74294 64102 375 387 677 91 229
3 45029 88460 39178 274 862 993
5 91656 7847 36915 44992 61893 240 42 486 545 305
5 84176 38849 27609 72636 82391 861 360 392 286 219
2 27044 48829 834 168
5 71695 63744 16657 95621 12068 509 16 317 664 5
3 46535 45274 69554 915 708 598
5 ...

output:

3.886436987
4.828402325
4.241524420
2.020266124
2.016301331
2.336266636
2.277829314
3.115266655
1.829793626
2.663849607
1.996753894
2.335784048
1.814851853
1.858520255
2.036237578
2.084840972
2.312432863
4.358560951
2.810932694
1.990202513
2.320619535
2.967289027
4.457124010
2.091537003
3.435412080
...

result:

ok 300000 numbers

Test #24:

score: 0
Accepted
time: 174ms
memory: 10292kb

input:

10 300000
5 70858 61540 67679 62486 9936 483 649 740 143 114
4 96931 62820 26452 34549 441 147 721 803
2 68161 33955 804 951
2 59834 90030 894 81
2 56615 17480 610 502
2 78398 36283 741 360
2 34933 88158 891 150
5 56539 79406 11934 45198 79211 759 799 203 482 996
2 85259 87478 634 354
5 20179 69266 ...

output:

0.069897731
0.347963772
1.174056164
0.000000000
0.095752086
2.692615387
0.026074513
0.759357756
0.000000000
0.002231903
0.062245653
0.034243873
0.554597245
0.000000000
0.003789271
0.000000000
0.148054495
0.026092131
0.005558738
0.000000000
3.122947546
0.000000000
1.414266832
0.123318930
0.159792769
...

result:

ok 300000 numbers

Test #25:

score: 0
Accepted
time: 261ms
memory: 10732kb

input:

1000 300000
2 84250 9940 822 333
3 11817 1621 66723 783 475 855
3 14193 51801 80603 459 913 781
3 45892 79597 51991 534 693 429
5 31168 83082 12880 52743 15259 316 376 223 547 600
2 66767 76783 702 846
2 22426 51907 861 643
2 62103 34470 121 276
5 93903 43385 18077 93366 88699 429 180 397 222 709
3 ...

output:

600.343523838
600.340213255
600.359201694
600.338356251
600.343523838
600.348095311
600.355624813
600.342280980
600.357306342
600.343523838
600.357516747
600.345806756
600.347678790
600.341660177
600.347262455
600.346222437
600.342280980
600.349763269
600.343523838
600.344768368
600.339593838
600.35...

result:

ok 300000 numbers

Test #26:

score: 0
Accepted
time: 277ms
memory: 10672kb

input:

1000 300000
5 81599 60638 24241 47364 81909 211 415 908 603 571
5 55972 79849 82630 81750 57714 311 278 443 53 455
3 35752 39134 36254 575 710 106
4 79138 64703 43257 88775 135 693 874 426
2 57132 92509 461 144
4 53871 2386 53742 72256 570 223 323 833
3 43191 33069 43115 105 407 656
3 56083 7682 724...

output:

589.829942810
589.942545930
592.680074753
589.904472426
590.027508154
595.450124683
592.679140394
594.216916016
591.334509067
589.848468271
592.846149734
592.028078116
592.645111424
589.932769743
592.795163444
590.775283091
589.573719909
589.671672101
591.940159680
592.222803134
594.790989471
589.42...

result:

ok 300000 numbers

Test #27:

score: 0
Accepted
time: 290ms
memory: 10740kb

input:

1000 300000
3 98060 15595 60475 846 131 849
4 66344 8428 20435 66985 575 855 613 222
2 36055 55773 599 183
4 61642 50861 78593 34743 130 701 352 353
2 73921 9075 852 993
3 20419 64920 59373 324 222 440
5 68121 75295 19210 48725 14102 356 763 277 104 935
2 72642 25128 310 127
5 99812 13972 76300 3101...

output:

479.680909792
559.880542786
551.501058026
485.149577068
516.101308653
504.089069837
549.833785763
589.053482031
481.842034239
530.364701677
489.703043912
515.258526262
483.892131111
549.428120236
511.991499094
587.056941259
592.783572007
491.220328101
478.892436530
500.399874233
576.718981542
493.97...

result:

ok 300000 numbers

Test #28:

score: 0
Accepted
time: 301ms
memory: 10740kb

input:

1000 300000
2 32732 44059 376 504
4 79598 95119 972 37471 531 149 313 55
2 19476 24603 354 497
3 95666 14230 18089 234 800 970
3 16475 96750 44845 501 607 758
5 89297 37326 45706 97640 45959 921 284 765 629 375
5 38973 6900 96331 41294 19691 914 171 481 241 257
4 8185 35930 27678 41856 517 168 11 77...

output:

301.555186191
404.786935093
261.711747264
408.273498552
234.068150685
344.015301132
312.432876150
172.180603861
330.784248298
164.607379969
222.391380099
238.434798661
200.655682585
220.869810044
261.334662552
457.200630514
175.115638638
297.552365172
260.290434547
261.584442063
522.286585163
229.10...

result:

ok 300000 numbers

Test #29:

score: 0
Accepted
time: 215ms
memory: 10536kb

input:

1000 300000
5 85721 60340 51957 49467 16065 981 982 873 292 800
5 3773 11734 48381 35228 15873 359 929 25 860 859
3 47216 44378 45298 121 948 274
5 61083 39739 73855 37414 37561 806 913 551 268 37
2 14796 92922 649 224
2 25163 44185 896 717
5 92350 93841 42670 30464 43630 30 171 954 700 885
5 24436 ...

output:

2.046779997
2.491515494
0.099673727
0.100471727
4.205745490
1.491321645
0.112805691
3.905864588
0.226832450
0.093696079
102.243006042
0.044206318
0.035244588
0.471613335
4.375261525
13.207606277
6.946541902
390.754025666
0.039633635
0.084064943
0.129250901
0.117865261
0.115567714
17.214190456
1.1975...

result:

ok 300000 numbers

Test #30:

score: 0
Accepted
time: 155ms
memory: 10644kb

input:

1000 300000
4 89993 23538 39615 38540 517 850 610 508
5 26964 77519 2269 35303 27339 111 467 83 301 211
4 96202 37228 23231 24309 986 895 345 766
5 86769 51230 10007 66718 40625 94 928 842 161 99
4 64925 34472 41278 11882 369 800 930 824
4 35320 66791 4089 4477 162 504 641 637
3 64053 65753 44948 54...

output:

0.000000000
0.000000000
247.715224744
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.001778593
0.000000000
0.935334356
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.316872220
0.000000000
0.000000000
0.000000000
0.000000000
0.00000000...

result:

ok 300000 numbers

Test #31:

score: 0
Accepted
time: 181ms
memory: 10668kb

input:

1000 300000
5 30466 86414 62578 7594 75197 417 512 738 361 891
3 34948 70502 10387 972 472 515
4 28405 12587 30671 48914 705 341 290 368
3 46194 8786 26901 815 713 982
3 36300 93352 77447 982 16 853
3 57450 49474 62910 631 654 725
4 12989 99690 41855 33415 980 965 53 586
2 55434 93614 433 565
3 3646...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 300000 numbers

Test #32:

score: 0
Accepted
time: 169ms
memory: 10680kb

input:

1000 300000
5 93664 30968 51651 11046 95770 237 146 538 821 334
3 67028 49460 15270 270 388 886
3 53800 60523 15341 928 444 29
4 36765 85066 73638 34472 584 671 17 46
2 36316 4130 340 340
3 74686 98983 66079 940 86 268
4 15653 46488 18760 17235 399 30 382 840
2 8052 37957 683 482
3 63480 1002 41695 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
6.883147548
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 300000 numbers

Test #33:

score: 0
Accepted
time: 353ms
memory: 19928kb

input:

50000 300000
2 19162 4275 229 580
2 5047 79258 832 762
5 30493 57246 19965 83085 41107 650 192 558 865 868
3 5163 41326 17640 52 922 20
3 3259 67604 84435 954 40 136
4 20477 32119 27145 8205 138 115 131 754
3 79209 9 74084 537 328 594
3 2022 80071 23608 345 703 527
4 54374 7035 24717 39188 796 214 7...

output:

30213.113880868
30213.091549530
30213.100334038
30213.086943424
30213.121921136
30213.111060709
30213.126207823
30213.120971378
30213.126685416
30213.116237985
30213.092933686
30213.127641382
30213.091549530
30213.130035852
30213.102190046
30213.106847523
30213.124776599
30213.120022649
30213.093857...

result:

ok 300000 numbers

Test #34:

score: 0
Accepted
time: 390ms
memory: 19160kb

input:

50000 300000
4 95746 46633 48769 95672 74 953 72 480
4 41325 6706 91366 92453 574 737 69 307
2 55433 5100 462 78
2 13500 63369 818 699
3 3355 90534 24139 171 688 421
4 38417 45136 99490 59886 397 39 920 296
4 46963 13880 40228 94288 74 686 670 825
2 13756 27722 817 965
3 62627 47895 59766 477 292 74...

output:

30244.201412548
30245.593030517
30253.281746210
30240.965322816
30247.256659050
30251.503209142
30252.303212136
30246.019807968
30254.961222288
30244.149119774
30249.204284587
30239.062360376
30256.253422822
30250.905109412
30241.590443410
30243.074896992
30245.013043336
30239.647408029
30243.992168...

result:

ok 300000 numbers

Test #35:

score: 0
Accepted
time: 399ms
memory: 20560kb

input:

50000 300000
3 16759 72826 84591 307 169 803
3 66480 96374 92817 275 370 696
5 93576 20421 36794 40572 47645 487 191 87 931 412
3 8119 84137 17276 748 901 835
5 7434 13951 50805 4129 31372 126 212 992 919 97
2 19873 79348 993 412
4 46127 75115 23135 23370 488 353 137 573
2 49961 58919 352 415
5 9653...

output:

30083.180037957
30311.667807237
29963.739900854
30140.693205212
29961.927306547
30032.382537072
30238.868801641
30224.397394878
30203.918917765
30092.893952615
30142.871126613
29979.537871093
30341.559247789
30147.635897253
30046.115765081
30124.761953256
30032.857078397
30033.574255828
30167.123063...

result:

ok 300000 numbers

Test #36:

score: 0
Accepted
time: 412ms
memory: 18844kb

input:

50000 300000
2 67978 8834 607 845
2 55281 47225 610 531
3 4841 27009 27438 268 956 790
3 45567 57438 18161 881 520 156
5 65966 89900 55528 41734 75483 165 817 610 585 903
4 77129 3268 78932 6707 612 429 977 741
4 98598 9759 48996 67784 113 83 690 941
3 94790 19925 97890 864 469 144
4 68408 41314 413...

output:

30004.993086501
29361.438495002
28886.368208400
28370.960545469
29846.548901694
29031.138213021
28632.670286898
29009.347409336
29381.292602948
28503.445968404
29526.381853439
28781.279340310
29191.560542972
29789.240257951
28372.134621333
29621.901232216
30084.397286660
29926.384091132
29253.642172...

result:

ok 300000 numbers

Test #37:

score: 0
Accepted
time: 415ms
memory: 20112kb

input:

50000 300000
4 42952 8648 61418 92401 722 553 118 627
3 12682 59383 2717 721 440 224
5 41053 80 39032 31216 11200 629 139 326 287 557
5 60670 24411 47997 22651 60438 964 105 517 469 9
5 24807 62977 74097 40262 9931 66 461 881 843 260
4 6284 71384 74529 27277 472 892 389 624
2 52888 18192 190 110
4 7...

output:

21741.374012913
22598.597912348
24732.626716438
23719.573551458
24885.679783010
20825.726988098
22828.346964393
26614.466505936
20824.532326560
24737.849609161
28427.517030632
23890.708912738
23944.659592500
26872.382905217
24087.641816907
22587.171496516
22089.873844907
22099.901374191
25265.209161...

result:

ok 300000 numbers

Test #38:

score: 0
Accepted
time: 418ms
memory: 19892kb

input:

50000 300000
3 11664 16768 25764 650 496 851
5 75273 3863 90952 38022 93756 390 116 402 931 48
2 28002 6202 633 854
3 41009 16068 1948 33 109 276
4 7274 58076 51516 76811 516 69 815 947
4 50190 90273 20542 46285 316 227 465 421
4 28523 82839 94763 45130 114 557 209 471
5 23478 80816 66186 45147 2190...

output:

20152.551359407
4220.401984609
10665.430213819
5556.521289389
24563.714479872
23201.986489145
9083.802572006
7185.846708749
8114.791714419
12996.653276958
12377.765539128
23458.674158082
9904.913108000
3369.574062815
5035.429623119
6947.189727135
4410.305649486
4110.320032177
6908.519627721
6020.278...

result:

ok 300000 numbers

Test #39:

score: 0
Accepted
time: 320ms
memory: 19432kb

input:

50000 300000
5 78774 52771 81320 77251 20768 745 753 120 947 495
3 99639 23561 11087 711 167 561
4 73761 8225 37742 51836 948 330 430 292
3 38333 28403 34005 397 967 822
5 45857 53001 38335 59752 46496 154 558 732 612 178
3 72800 74792 29984 724 532 543
2 53692 64524 708 39
5 40222 37728 6479 61240 ...

output:

0.000000000
41.110005735
86.349678908
0.000000000
931.994048799
0.155281869
2893.449485599
0.000000000
0.142569667
0.000000000
0.000000000
13.332111954
0.000000000
0.000000000
1656.969324688
100.500461669
0.000000000
15.130305603
395.186728508
0.000000000
0.000000000
46.820672590
3536.960631285
63.3...

result:

ok 300000 numbers

Test #40:

score: 0
Accepted
time: 253ms
memory: 18920kb

input:

50000 300000
4 86894 17118 86760 54025 67 979 911 309
2 24133 37473 603 941
2 86734 93162 866 629
4 80658 1967 5972 76928 408 116 749 704
2 43089 94436 548 816
5 92816 50457 12911 40830 70667 5 34 838 86 566
2 58229 3378 883 952
4 2103 93145 22858 19481 33 791 547 949
3 85722 18733 93033 121 882 372...

output:

153.828637302
0.070275819
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.249165931
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
32.873628178
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.0000000...

result:

ok 300000 numbers

Test #41:

score: 0
Accepted
time: 415ms
memory: 21980kb

input:

50000 300000
5 60519 1892 13772 11442 99197 193 926 519 101 185
5 10599 60099 40604 55719 37421 880 360 302 920 550
5 41018 42370 7479 42683 58623 748 535 233 193 352
5 4523 23932 47054 31686 9988 421 88 42 609 479
5 66085 42410 13711 5514 88439 597 752 476 173 939
5 58199 99182 54385 32201 19450 48...

output:

32010.869402951
32010.868767374
32010.869630059
32010.867860242
32010.867860242
32010.868540499
32010.867225832
32010.870812013
32010.867769583
32010.868994311
32010.867678933
32010.869130502
32010.871403614
32010.871130516
32010.869175904
32010.868812757
32010.870994000
32010.869357537
32010.869539...

result:

ok 300000 numbers

Test #42:

score: 0
Accepted
time: 475ms
memory: 22240kb

input:

50000 300000
5 65688 27323 52741 32428 67898 393 463 913 518 485
5 54643 77541 56339 71054 1385 791 515 455 875 975
5 32271 79568 96171 58553 96949 193 965 835 567 915
5 93661 93677 46337 74228 58466 139 648 370 379 491
5 88280 79138 42561 92660 76447 977 821 879 464 169
5 48858 89306 7083 35632 521...

output:

32163.678129440
32164.850926334
32163.379272806
32164.832709045
32162.640406158
32164.682863664
32162.614594711
32164.173041569
32163.029098152
32163.336646656
32165.865715925
32165.201596046
32164.014317918
32165.298492608
32164.881793178
32165.546754525
32164.180719626
32163.953959968
32165.182169...

result:

ok 300000 numbers

Test #43:

score: 0
Accepted
time: 428ms
memory: 21896kb

input:

50000 300000
5 97449 44094 45539 59427 79417 90 551 259 750 773
5 755 78461 70405 84188 25905 804 594 420 1000 161
5 15487 71214 84721 43369 69788 182 242 137 171 528
5 96976 58725 76324 90349 23380 463 131 186 292 508
5 44607 19030 60296 80580 53417 266 189 17 389 468
5 28209 72746 66070 95895 9710...

output:

32159.120063483
32087.724804805
32101.348913442
32078.908625199
32192.423964240
32089.566586787
32065.995980979
32106.875232032
32087.814338323
32142.126505428
32075.859026496
32098.604279320
32089.427275250
32161.611605166
32203.453937901
32153.997183245
32084.867929916
32129.970991237
32131.857357...

result:

ok 300000 numbers

Test #44:

score: 0
Accepted
time: 412ms
memory: 22448kb

input:

50000 300000
5 61840 3702 21753 57513 53808 811 829 533 988 141
5 76213 50209 48660 11759 70331 677 259 105 149 908
5 55622 6254 10932 47176 52965 196 585 18 203 248
5 6366 80547 34345 69026 79347 185 337 816 854 654
5 82383 60870 4999 90067 74375 776 22 748 74 740
5 32613 59280 82942 50572 30460 48...

output:

31094.471243473
31676.315606697
31319.313665557
31331.532657307
31233.079181336
31870.064145312
31255.819990917
31823.363712165
31339.899917932
31537.034465091
31744.929056940
31436.189512930
31007.779908469
31294.306805810
31351.302950496
31484.214166624
31897.668228907
31187.188858292
31788.703797...

result:

ok 300000 numbers

Test #45:

score: 0
Accepted
time: 505ms
memory: 22260kb

input:

50000 300000
5 14220 69596 48346 3650 3410 986 601 787 334 471
5 77482 92526 59347 8708 44918 75 47 545 481 82
5 39837 27060 69537 16208 54778 163 648 333 488 869
5 62025 12904 25149 55262 45704 946 436 588 309 248
5 84498 60957 80921 57550 98706 826 31 941 496 705
5 20161 31733 83228 16642 17798 24...

output:

28370.994558167
30728.184574146
25981.709743170
30338.742886756
27241.791337117
25804.372139324
31468.426794022
30479.612956014
28324.372309290
30145.570045956
30224.968231198
30091.380003811
26469.828060171
31140.340308974
27202.971318830
28889.593523805
26382.424286651
27554.597695620
25969.042075...

result:

ok 300000 numbers

Test #46:

score: 0
Accepted
time: 456ms
memory: 22104kb

input:

50000 300000
5 49636 21618 70624 78040 90131 456 875 730 702 767
5 81935 70781 86918 53134 46791 36 732 695 636 548
5 7581 85975 73344 32089 57791 507 721 365 912 245
5 83847 46733 71122 11230 41721 856 577 853 455 912
5 36738 81468 14599 78508 18216 466 762 922 472 119
5 30887 15901 5202 74189 9406...

output:

10174.656010444
21773.948466626
9569.389673000
16887.221442639
9886.192741197
8607.096726970
30326.971282552
23983.064685085
28464.026395695
16794.543405028
11578.642394309
16263.687070139
8221.023056740
10751.346995424
16507.565554612
10175.542654504
10259.081753034
17011.537457678
8459.057818510
2...

result:

ok 300000 numbers

Test #47:

score: 0
Accepted
time: 402ms
memory: 21964kb

input:

50000 300000
5 39723 72403 16760 60346 201 228 130 75 928 583
5 24252 81469 16571 27721 76189 632 684 27 106 297
5 95683 44581 42377 33902 48759 273 444 650 533 889
5 24716 61729 57359 77586 53890 955 349 12 345 574
5 69529 16174 25187 2839 53266 475 956 240 733 864
5 70636 91996 71272 61526 47535 9...

output:

5.707489600
3.363885426
246.598588222
750.957717416
6004.873353777
21686.372356568
19.671181620
7687.917185361
23.898016583
11.645449699
540.929110026
131.698037755
322.831422431
156.595420149
161.824749342
820.373161025
6068.606869123
25.949312522
142.264212798
63.349662256
3.446578914
6.475822572
...

result:

ok 300000 numbers

Test #48:

score: 0
Accepted
time: 288ms
memory: 22200kb

input:

50000 300000
5 91744 37786 66959 14364 83672 310 368 443 32 233
5 2507 9039 28293 29594 88150 21 833 774 277 728
5 54598 48388 58257 4211 61102 347 772 74 909 86
5 50032 74998 46030 73604 79097 584 911 751 713 351
5 46936 91068 70336 55054 64907 503 937 216 635 564
5 63316 70865 37331 37797 83977 94...

output:

6578.534468952
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
622.187417539
0.000000000
0.000000000
0.000000000
0.000000000
1790.328078392
0.000000000
0.000000000
0.000000000
0.000000000
0.088642925
0.000000000
6.243016405
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
173....

result:

ok 300000 numbers