QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#57772#3840. Pass the Ball!ZhangYiDeWA 339ms13656kbC++172.4kb2022-10-22 21:07:132022-10-22 21:07:15

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4 4
2 4 1 3
1
2
3
4

output:

25
20
25
30

result:

ok 4 lines

Test #2:

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

input:

3 6
2 3 1
1
2
3
999999998
999999999
1000000000

output:

11
11
14
11
14
11

result:

ok 6 lines

Test #3:

score: 0
Accepted
time: 4ms
memory: 12944kb

input:

3 6
3 1 2
1
2
3
999999998
999999999
1000000000

output:

11
11
14
11
14
11

result:

ok 6 lines

Test #4:

score: 0
Accepted
time: 29ms
memory: 13036kb

input:

1000 10000
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

output:

333334000
332835500
332338000
331841500
331346000
330851500
330358000
329865500
329374000
328883500
328394000
327905500
327418000
326931500
326446000
325961500
325478000
324995500
324514000
324033500
323554000
323075500
322598000
322121500
321646000
321171500
320698000
320225500
319754000
319283500
...

result:

ok 10000 lines

Test #5:

score: 0
Accepted
time: 30ms
memory: 13036kb

input:

1000 10000
187 493 316 665 124 40 448 649 657 65 438 730 816 107 789 286 309 469 169 216 488 52 212 111 541 83 990 48 282 867 36 220 676 241 959 372 322 244 481 708 595 957 215 223 120 658 291 176 229 158 431 492 221 986 889 861 606 518 106 349 410 765 745 812 563 998 150 392 358 328 747 793 587 507...

output:

250347169
248662078
245260552
253150328
247096579
249698948
249942589
251180693
248589849
253775352
248472247
248369272
249001282
249611561
251718722
248202949
252492155
251442262
255269934
247070745
248898892
250071493
249262069
247714054
248954719
251676093
251650611
249152315
248608212
249678723
...

result:

ok 10000 lines

Test #6:

score: 0
Accepted
time: 43ms
memory: 13136kb

input:

1000 10000
301 793 604 129 545 524 625 540 271 616 710 629 682 190 152 287 40 5 921 699 730 427 833 680 514 782 641 754 15 218 725 862 238 468 917 368 850 35 243 339 688 460 597 979 398 748 552 25 189 68 115 76 888 844 890 102 835 581 266 342 571 749 574 156 717 538 440 764 601 831 130 39 136 842 78...

output:

250889096
249771741
249454079
255348475
249559048
257117687
248782164
250050189
254433188
254774148
251601723
250597849
251570596
249861162
256368189
253409601
254026050
249568513
248807065
253946543
254531155
252620668
255570774
257943265
252823304
255566622
252678751
254417015
252540528
256854774
...

result:

ok 10000 lines

Test #7:

score: 0
Accepted
time: 25ms
memory: 13092kb

input:

1000 10000
163 149 53 93 995 744 452 73 683 474 213 597 903 190 842 487 894 256 339 588 902 930 870 632 992 561 455 248 961 788 188 436 421 887 847 361 311 192 706 636 352 233 987 376 323 32 120 565 546 730 191 587 404 22 817 906 585 420 621 167 132 816 431 200 952 180 402 838 794 284 349 94 427 482...

output:

250865862
251948566
251553098
253385993
250129972
254017302
254493541
251442447
247937015
250833800
249523549
249193386
252059812
249370594
254109165
249397918
247138568
248934855
249807415
251196617
250357758
249395769
248148350
247009170
252163335
249850249
250639740
251827755
247795165
253868762
...

result:

ok 10000 lines

Test #8:

score: 0
Accepted
time: 51ms
memory: 13048kb

input:

1000 10000
384 881 331 471 166 902 45 90 353 415 895 74 693 69 887 878 807 436 538 328 892 750 294 891 238 527 406 464 23 259 200 731 336 62 30 157 457 243 956 485 670 37 405 16 14 162 484 875 64 38 305 177 391 882 440 649 296 702 990 953 468 109 915 316 622 81 863 286 412 584 659 271 282 984 490 97...

output:

251829371
249579880
249800743
251369774
250567175
248916841
252235114
251856809
249117279
247474406
250612288
247256785
251394491
250004784
252462213
249291071
251938054
251833233
254868301
251496842
242701038
251189092
250051802
248910394
249438626
245833186
250955694
251605815
251188358
253696421
...

result:

ok 10000 lines

Test #9:

score: 0
Accepted
time: 39ms
memory: 13136kb

input:

1000 10000
791 811 116 51 267 840 647 573 765 859 154 984 879 576 938 308 808 301 287 158 43 453 284 243 945 585 156 648 447 331 930 296 657 820 991 457 969 237 644 784 514 685 487 506 353 854 336 7 111 324 593 4 234 548 680 923 501 186 201 918 821 968 549 236 171 173 553 476 882 569 74 841 910 689 ...

output:

260869097
250249635
252485552
251312537
249827807
247891441
247306872
250706363
246507025
251504505
253441362
252531355
248389010
251206287
251647794
256299060
251419971
256041214
250785378
257137028
247372087
262923110
250837210
248771282
245058822
265251780
251710904
249728123
250029619
252510223
...

result:

ok 10000 lines

Test #10:

score: 0
Accepted
time: 48ms
memory: 13036kb

input:

1000 10000
107 858 884 149 531 779 189 350 748 934 302 276 957 567 102 902 906 898 373 631 532 743 683 856 625 610 80 863 986 16 322 141 538 352 758 5 656 870 828 180 982 356 308 19 240 422 622 859 850 331 565 472 321 365 962 941 638 188 448 403 864 588 222 22 184 854 300 554 781 711 973 324 283 359...

output:

252498827
250467741
245004582
254567945
248723182
266747940
252248407
250985182
246296872
258740339
250929702
252439407
264653513
256570063
251140559
251878111
245187220
257848088
248480375
257243736
247751395
252036917
250285176
249672867
247804044
247486222
252436982
247016052
254469398
257746086
...

result:

ok 10000 lines

Test #11:

score: 0
Accepted
time: 18ms
memory: 13104kb

input:

1000 10000
469 92 385 860 536 350 852 471 547 625 369 749 339 169 21 565 312 801 41 996 326 280 660 211 910 75 929 202 768 652 865 4 498 109 179 568 601 167 276 661 297 654 909 958 922 815 515 673 253 771 879 108 682 405 476 418 604 847 225 265 329 270 228 872 571 775 69 180 118 78 35 808 795 412 13...

output:

249086375
263201066
251739073
251359274
253144475
272709870
251828190
252458176
265505472
261406223
268442012
246572070
247852028
276578867
252522304
277213878
270316579
252964972
261401771
275240590
279151202
251157983
259726293
256059004
255499430
253949570
253723754
275131199
250198559
251473808
...

result:

ok 10000 lines

Test #12:

score: 0
Accepted
time: 37ms
memory: 13116kb

input:

1000 10000
458 237 370 989 962 641 819 68 976 944 204 184 479 612 434 436 765 572 554 959 36 710 891 584 882 521 928 94 263 633 406 833 534 363 513 21 281 745 699 864 669 850 529 315 455 375 292 60 70 685 782 613 344 217 931 862 739 215 691 48 635 940 182 348 188 801 432 8 696 49 236 772 539 757 193...

output:

333833500
333833500
333833500
249545048
333833500
249545048
249545048
249545048
249545048
249545048
249545048
333833500
249545048
333833500
249545048
333833500
249545048
249545048
333833500
333833500
249545048
249545048
333833500
249545048
249545048
249545048
333833500
333833500
249545048
333833500
...

result:

ok 10000 lines

Test #13:

score: -100
Wrong Answer
time: 339ms
memory: 13656kb

input:

10000 100000
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...

output:

-1674109088
-1724094088
-1774069088
-1824034088
-1873989088
-1923934088
-1973869088
-2023794088
-2073709088
-2123614088
2121458208
2071573208
2021698208
1971833208
1921978208
1872133208
1822298208
1772473208
1722658208
1672853208
1623058208
1573273208
1523498208
1473733208
1423978208
1374233208
1324...

result:

wrong answer 1st lines differ - expected: '333333340000', found: '-1674109088'