QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#772634#6542. Optimal Quadratic FunctionutilforeverTL 2230ms4052kbC++232.8kb2024-11-22 20:56:222024-11-22 20:56:22

詳細信息

Test #1:

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

input:

1
4
0 0
1 3
2 9
3 0

output:

5.062500000004

result:

ok found '5.0625000', expected '5.0625000', error '0.0000000'

Test #2:

score: 0
Accepted
time: 2230ms
memory: 3976kb

input:

60
1
1000 -990
2
171 -638
949 -99
2
633 227
-257 -602
3
634 -994
633 999
-374 995
3
445 -110
586 -121
462 29
9
-995 -224
-458 -833
691 -670
456 -259
-376 55
-563 -12
834 827
-826 -220
299 744
17
997 991
997 976
997 988
998 -986
999 -982
999 -980
999 -996
998 -988
998 -991
997 987
1000 996
999 -1000
...

output:

0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
543160.125996585216
121.000000000000
0.832006181265
412780.607179672475
12.250000000000
15750.250000000000
118751.380086148915
880245.505473573651
1.000000000001
15.363373360362
854986.713165176609
20.250000000000
24567.66738...

result:

ok 60 numbers

Test #3:

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

input:

1000
1
-585478 527569
1
152984 679945
1
-174472 172630
1
235983 471538
1
-250372 650998
1
521028 -109032
1
121457 989514
1
916700 -223410
1
25908 939341
1
999032 369442
1
249207 -874185
1
-921949 719467
1
-692065 -756006
1
580461 644861
1
-382986 975568
1
644060 -113069
1
-588888 717169
1
2947 -3929...

output:

0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
...

result:

ok 1000 numbers

Test #4:

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

input:

1000
2
578578 -462573
-614596 -50411
2
568651 926188
-15389 -281674
2
-56242 -213116
215036 310015
2
-568452 -743741
-314862 -573269
2
-428037 -926383
-172945 -31965
2
-58020 145819
-69585 116311
2
-629887 -794837
704590 -761914
2
243217 -433618
98814 -457689
2
147490 681479
665176 -119632
2
-851707...

output:

0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
...

result:

ok 1000 numbers

Test #5:

score: 0
Accepted
time: 1183ms
memory: 3824kb

input:

1000
3
-734917 -489090
419510 102330
712427 633246
3
36286 -456156
747264 -743132
260371 -674274
3
429263 14588
352092 -105774
547767 232534
3
-913665 328259
240305 -680653
-295994 -678964
3
597443 -368402
-231672 43641
-590555 396735
3
-603016 904082
-607928 649743
464117 526551
3
350193 -351624
33...

output:

0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
0.000000000000
...

result:

ok 1000 numbers

Test #6:

score: 0
Accepted
time: 1316ms
memory: 4052kb

input:

1000
4
-48411 -514672
165369 -349660
-281244 -842990
50473 -422110
4
-487482 -318709
861670 -709796
-491931 -335068
-523699 -455262
4
-817575 -338873
869501 905839
-717462 -668516
841972 769497
4
530706 615905
128991 -871809
82920 -948448
-317630 -725769
4
144451 772470
-923425 791489
513030 193835
...

output:

0.001635260350
0.441888893764
0.095087562487
3655702.652135094908
769858.665876636752
876.964424564160
2.383378133002
0.003314370000
0.046074293414
0.414087190336
31534.752845131748
0.011533324462
1322109.793476496793
2475705.141895928664
5494047.076440765885
0.604758315693
36615.982269673274
15433....

result:

ok 1000 numbers

Test #7:

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

input:

1000
5
-425128 981633
-381689 946206
957441 996145
84010 712860
-8814 738024
5
235841 662950
864929 -477349
823444 -108225
714735 661226
300163 983888
5
-972539 106077
-856485 556296
-951397 193386
-207377 778279
-862794 555900
5
-877483 818676
537271 -193411
341352 408858
167065 819835
451709 87895...

output:

162.217425196754
24899.703040270159
111166879.556464290006
440.668048445863
45502620.026469122611
0.908165780461
48119370.938423831722
1331743.107382222264
1145.041060364813
11911.409092610236
898995.931137447080
0.281486409273
7.835265460147
0.770599289410
1167.305707781574
40318098120.011682998389...

result:

ok 1000 numbers

Test #8:

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

input:

1000
10
860001 272235
-30508 220967
711207 504388
77794 647164
303746 959200
592742 534104
57277 254211
266565 968002
919148 568676
991753 -20796
10
95213 204518
35283 198770
69842 203724
-316246 248661
-319918 245804
-923990 767251
-689125 503455
175418 229272
90053 206083
-815528 637145
10
-808164...

output:

52855287328.854639191180
4736213.545035249403
325.276613235445
11692527.619359872846
61306.467095483445
24947264304.376909308136
492734951022.513062089682
0.965345757685
1913.495526858434
385.474666865936
6.448445458400
42078421804.716300874949
5867468.015783667079
0.606672067964
24254772.5154816240...

result:

ok 1000 numbers

Test #9:

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

input:

1
4
-1000000 -1000000
-999999 1000000
999999 1000000
1000000 -1000000

output:

0.000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #10:

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

input:

1
4
-1000000 -1000000
-999999 1000000
-999998 1000000
-999997 -100000

output:

12656250000.000000153668

result:

ok found '12656250000.0000000', expected '12656250000.0000000', error '0.0000000'

Test #11:

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

input:

1
4
-1000000 -1000000
-999999 1000000
-999998 1000000
-999997 -1000000

output:

0.000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #12:

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

input:

1
4
-1000000 -300000
-999999 300000
-999998 300000
-999997 -300000

output:

0.000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #13:

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

input:

1
4
-1000000 -999999
-999999 999998
-999998 999996
-999997 -999999

output:

0.562500000001

result:

ok found '0.5625000', expected '0.5625000', error '0.0000000'

Test #14:

score: 0
Accepted
time: 7ms
memory: 3760kb

input:

8
4
-1000000 -1000000
-999999 1000000
999999 999977
1000000 -1000000
4
-1000000 -1000000
-999999 1000000
999999 999770
1000000 -1000000
4
-1000000 -1000000
-999999 1000000
999999 997770
1000000 -1000000
4
-1000000 -1000000
-999999 1000000
999999 977770
1000000 -1000000
4
-1000000 -1000000
-999999 10...

output:

33.062533409053
3306.253303886285
310806.560723617371
30885837.135446789736
62499874999.995807673782
561097185.447763677395
0.563062923748
2770157895.490926387720

result:

ok 8 numbers

Test #15:

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

input:

50
20
-78760 901241
-290160 346799
-100100 886312
-400033 -7842
-128289 858428
-443380 -236792
-204313 613533
870820 96059
812309 226162
-35539 980448
797663 345545
-445875 -256648
-460410 -299719
627726 793426
832862 169452
656272 795052
-339551 196857
-34433 992148
-388395 11457
-255059 482328
20
...

output:

1995515551.237420826335
81676587.163918263454
15097.239982003213
23.395512450972
579359934.010628823948
3853.663650190895
50.381382994868
2611489.366471234973
131464690.064314106603
2137.820044948756
284.143969728855
564775635.753034209833
39822891364.891175128520
909.273877472602
16588.063575511509...

result:

ok 50 numbers

Test #16:

score: -100
Time Limit Exceeded

input:

500
300
-574218 -271807
-443150 -83950
15479 867073
-467689 -121944
-318587 129168
-24306 766466
-968754 -612160
-814705 -519500
-60831 677156
-195474 372912
-44244 717366
-134450 505915
-523893 -204101
-179966 405956
-732527 -448979
-886997 -569400
-190507 383431
-538163 -223837
-885831 -568677
-60...

output:


result: