QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#648456#5459. Goose, goose, DUCK?ucup-team3340TL 3780ms204468kbC++204.0kb2024-10-17 19:04:472024-10-17 19:04:47

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 159896kb

input:

6 2
1 2 2 1 3 3

output:

10

result:

ok 1 number(s): "10"

Test #2:

score: 0
Accepted
time: 19ms
memory: 159888kb

input:

6 1
1 2 3 4 5 6

output:

0

result:

ok 1 number(s): "0"

Test #3:

score: 0
Accepted
time: 16ms
memory: 159912kb

input:

100 10
142826 764475 142826 986320 764475 142826 142826 986320 764475 986320 764475 764475 764475 142826 142826 986320 764475 986320 764475 764475 142826 764475 142826 764475 986320 986320 764475 142826 764475 764475 142826 764475 764475 986320 142826 142826 142826 142826 764475 986320 986320 764475...

output:

4309

result:

ok 1 number(s): "4309"

Test #4:

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

input:

1000 100
144044 144044 606320 144044 144044 653289 606320 606320 606320 144044 653289 606320 144044 606320 144044 653289 606320 653289 144044 144044 606320 606320 606320 144044 606320 653289 653289 144044 606320 606320 606320 606320 606320 606320 606320 606320 653289 606320 653289 606320 653289 6532...

output:

494331

result:

ok 1 number(s): "494331"

Test #5:

score: 0
Accepted
time: 8ms
memory: 159988kb

input:

1000 2
37158 712133 695735 352502 37158 111876 979836 322207 850 170255 712133 37158 68113 170255 269273 322207 644692 127744 575843 269273 352502 68113 166126 413274 111876 575843 704107 695735 37158 604776 127744 269273 166126 704107 850 111876 352502 979836 850 850 712133 850 979836 575843 704107...

output:

382010

result:

ok 1 number(s): "382010"

Test #6:

score: 0
Accepted
time: 8ms
memory: 160060kb

input:

1000 1
439144 11249 309118 842057 842057 938195 823723 842057 589439 914850 938195 455713 91595 938195 553566 761181 553566 70966 455713 439144 704849 11249 11249 236580 320993 933831 872377 589439 435476 558991 914850 690853 482410 690853 715546 155003 435476 155003 435476 435476 842057 236580 7096...

output:

341042

result:

ok 1 number(s): "341042"

Test #7:

score: 0
Accepted
time: 11ms
memory: 162244kb

input:

1000 1
675227 756097 647871 465683 473815 162625 396802 61313 758469 968915 283015 326083 86904 672294 145904 621859 346020 237440 669779 282692 626616 722910 999031 141389 440533 971280 807058 346648 405103 669779 463968 214284 50833 661085 826455 991362 984243 704592 426668 998421 949882 147122 72...

output:

1

result:

ok 1 number(s): "1"

Test #8:

score: 0
Accepted
time: 1322ms
memory: 204468kb

input:

1000000 1
420242 544222 171447 777913 987553 724009 569564 35971 931705 898245 672004 267555 967920 126950 627536 979230 592634 345070 437097 838283 124796 525563 988560 362647 502828 510728 538451 742569 327219 207978 943947 684879 278534 669721 356340 258535 85663 265714 956295 291196 419333 19692...

output:

0

result:

ok 1 number(s): "0"

Test #9:

score: 0
Accepted
time: 1526ms
memory: 169192kb

input:

1000000 1
559660 917135 718911 137428 227265 619698 582978 634509 968207 398589 647945 907790 647945 453872 267596 39233 647945 225421 404411 559660 401213 907790 765663 401213 339252 723380 907790 619698 896672 907790 58034 686103 455430 917135 686103 225421 619698 203386 893988 438096 75622 401213...

output:

499686064890

result:

ok 1 number(s): "499686064890"

Test #10:

score: 0
Accepted
time: 2496ms
memory: 169508kb

input:

1000000 20
861642 606482 953312 90817 363428 948603 487519 232986 519567 387790 428832 519567 307633 737110 521903 537123 787533 232986 5583 363428 162408 90817 179560 859355 774243 861642 776916 206258 801420 519567 801420 422101 206258 787533 390434 62305 994340 741875 801420 138248 519567 531603 ...

output:

499129896013

result:

ok 1 number(s): "499129896013"

Test #11:

score: 0
Accepted
time: 3536ms
memory: 169128kb

input:

1000000 200
485566 524102 778359 799174 823706 763480 616196 623850 594064 472722 778359 759395 336774 823706 814350 623850 662712 209130 702939 493199 974047 941295 623850 472722 947166 336774 493199 371798 974047 632804 702939 724695 509242 662712 776785 411318 280490 759395 336774 89517 493199 30...

output:

498381370313

result:

ok 1 number(s): "498381370313"

Test #12:

score: 0
Accepted
time: 908ms
memory: 167480kb

input:

1000000 2000
278305 278305 348110 113854 832030 667125 113854 821689 667125 481645 305363 481645 348110 481645 278305 123360 821689 348110 481645 305363 305363 832030 123360 821689 832030 481645 113854 123360 832030 541509 278305 832030 541509 113854 481645 278305 113854 481645 305363 348110 278305 ...

output:

499905050517

result:

ok 1 number(s): "499905050517"

Test #13:

score: 0
Accepted
time: 1781ms
memory: 170936kb

input:

1000000 1
20506 24350 30587 37027 42391 66414 97104 110890 139464 147153 151865 154652 163381 181574 232570 237490 262035 270050 287512 300416 308447 310125 310983 312781 317123 318837 328920 330480 344807 346415 348094 350611 356439 366128 374463 383635 386897 408221 415742 416461 417999 419807 425...

output:

499801321042

result:

ok 1 number(s): "499801321042"

Test #14:

score: 0
Accepted
time: 1837ms
memory: 170840kb

input:

1000000 3
11023 31773 32161 38871 41021 44852 48136 50602 53388 101255 102564 106529 107369 122558 127492 129008 139504 168813 175401 197384 227294 235164 240779 260845 274861 280036 294860 328235 353725 355819 364809 368636 371245 380336 385635 387362 387463 397455 399364 401758 407996 424116 42811...

output:

499800994499

result:

ok 1 number(s): "499800994499"

Test #15:

score: 0
Accepted
time: 1897ms
memory: 170852kb

input:

1000000 20
3503 16481 16795 23406 31913 41872 51334 54530 54659 58868 61041 88488 93579 109541 110340 128839 131239 134456 158540 178156 181454 198922 200083 203463 220228 224053 260400 262942 280472 285105 287261 318193 338271 345198 355790 359916 372574 374790 380392 391766 416424 418976 424552 42...

output:

499797927548

result:

ok 1 number(s): "499797927548"

Test #16:

score: 0
Accepted
time: 1952ms
memory: 170884kb

input:

1000000 100
26705 33485 50901 54941 68943 81029 85286 113183 123732 125867 126194 135433 178979 180530 192244 193156 208961 212468 217679 227986 240063 252514 254933 257638 257813 261582 271371 292677 298888 319760 321433 327241 345967 347806 360472 369382 385741 390248 396342 405013 405299 411923 4...

output:

499785153218

result:

ok 1 number(s): "499785153218"

Test #17:

score: 0
Accepted
time: 2115ms
memory: 170656kb

input:

1000000 1000
54734 56859 60900 69121 73309 75054 98086 124241 128326 130579 133938 138638 170907 174090 209593 210626 227131 240148 285324 294171 294911 306676 310066 315911 316415 323391 325543 335382 338701 356893 357975 361369 375642 393131 412064 424646 429594 433991 441381 448701 450511 478719 ...

output:

499711049085

result:

ok 1 number(s): "499711049085"

Test #18:

score: 0
Accepted
time: 339ms
memory: 170688kb

input:

1000000 10000
15780 26236 27684 29851 30391 70638 74718 105424 106626 112856 121360 136256 143306 144423 160215 172628 178833 187008 187580 193012 204251 249462 268531 307132 312751 317920 334377 334794 338564 346157 346869 361652 385944 418212 419616 431221 452685 453777 457638 457725 499400 508745...

output:

500000494950

result:

ok 1 number(s): "500000494950"

Test #19:

score: 0
Accepted
time: 2076ms
memory: 171388kb

input:

1000000 3
13192 25254 37301 53898 55107 56589 60875 62479 90808 108918 112707 135312 138180 140042 144199 146700 148639 159639 161015 182707 203339 205293 217104 217993 221972 233487 256690 279730 303295 315509 323466 324495 343702 348772 362594 552837 376486 381055 388704 399808 401931 422683 43256...

output:

499724407843

result:

ok 1 number(s): "499724407843"

Test #20:

score: 0
Accepted
time: 2425ms
memory: 171296kb

input:

1000000 20
31594 44498 46841 50016 54025 62603 67202 69488 70166 115334 144272 148075 153366 157675 165752 175136 182730 201633 206707 212924 226032 245422 258994 270652 317043 338717 338753 339996 345085 346180 359946 367730 371425 376731 407733 409245 410195 416008 431461 439720 442584 444716 4468...

output:

499596476425

result:

ok 1 number(s): "499596476425"

Test #21:

score: 0
Accepted
time: 2730ms
memory: 171456kb

input:

1000000 100
57157 111627 122547 135685 140722 142818 153374 209026 223146 239026 252837 256776 281064 289700 290219 292233 294024 349159 355923 361093 362183 378753 381072 389411 391472 391617 396151 397557 398169 428876 432451 435010 449056 449146 451048 460835 462298 474684 482179 482770 488686 49...

output:

499391962641

result:

ok 1 number(s): "499391962641"

Test #22:

score: 0
Accepted
time: 3401ms
memory: 171388kb

input:

1000000 1000
31493 41881 47733 61011 71910 80336 95923 110457 110595 120368 127883 129274 173259 176814 195869 210362 221085 239440 255462 257568 259584 285984 290476 297671 313610 334878 338145 362300 365380 367825 380147 392530 394324 395227 406251 406263 418868 432138 437741 438162 486778 512830 ...

output:

498783493376

result:

ok 1 number(s): "498783493376"

Test #23:

score: 0
Accepted
time: 344ms
memory: 171092kb

input:

1000000 10000
42038 50384 66576 86923 87920 89011 112787 113849 124259 126873 129621 137006 139874 157994 325776 166583 186258 198164 209632 210915 211671 214969 216668 217801 237103 239515 249705 268737 281178 294292 319964 325776 340804 352085 354292 363407 388690 392733 393593 397954 405187 41300...

output:

500000487674

result:

ok 1 number(s): "500000487674"

Test #24:

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

input:

1000000 20
8297 10253 11655 35181 469963 40980 44610 45480 45968 144412 349288 110821 793614 35181 141187 44610 144412 147994 162380 163126 8297 715077 223055 227282 239159 255415 256199 270255 793614 393755 286243 296085 307696 864863 322214 326864 328862 594408 673065 386853 393755 937498 412435 4...

output:

498372290400

result:

ok 1 number(s): "498372290400"

Test #25:

score: -100
Time Limit Exceeded

input:

1000000 100
486435 23761 24235 33864 40684 53396 57584 295737 896419 77583 583583 548385 493160 791063 144501 486435 170285 174686 187914 77583 199976 209866 221143 222079 231963 975385 245272 246644 252021 295737 296906 313568 324144 334442 343938 349704 368668 421176 805941 919799 382762 812603 42...

output:


result: