QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#863571 | #9786. Magical Bags | ucup-team2401# | AC ✓ | 139ms | 33384kb | C++23 | 2.6kb | 2025-01-19 19:23:38 | 2025-01-19 19:23:38 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3712kb
input:
4 3 4 7 10 2 1 9 4 11 2 8 14 3 6 12 13
output:
7
result:
ok 1 number(s): "7"
Test #2:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
4 1 1 1 2 1 3 1 4
output:
4
result:
ok 1 number(s): "4"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
4 3 4 7 10 2 1 9 4 11 2 8 14 3 6 12 13
output:
7
result:
ok 1 number(s): "7"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
4 1 1 1 2 1 3 1 4
output:
4
result:
ok 1 number(s): "4"
Test #5:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
100 4 372861091 407948190 424244630 359746969 6 568180757 527358812 494745349 665803213 674832670 586694351 4 696340797 775899164 919971335 716827187 4 123145962 344250363 122030550 251739234 4 342654413 368648894 150539766 255189030 1 194505887 3 755984448 736803561 745474041 4 709314938 498953418 ...
output:
177
result:
ok 1 number(s): "177"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 5 128474911 128789041 128389100 128571722 128449204 4 190783009 179144907 191954599 169739385 7 922968028 923017780 923012667 922993373 923012653 923010830 922983606 1 399117777 8 693609160 693615962 692956804 692902832 694104582 693605539 693750551 692909362 4 133590022 156691169 120354087 1477...
output:
175
result:
ok 1 number(s): "175"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 3 667874577 779650612 311873157 4 315088665 510831928 558038267 371108692 9 755153639 761562353 770756971 766146687 755341778 756786965 752029435 762376276 769269467 6 104846116 127832365 303763622 308914288 193368850 212600340 4 278400790 520739777 691975492 363532266 3 882063076 834874749 8790...
output:
188
result:
ok 1 number(s): "188"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 3 906356952 850278493 852337285 4 171262913 167082071 210705401 185031512 7 802495630 790288362 821278829 774987331 774050880 798490416 758938148 5 15709100 243583562 406822217 439043410 105298894 3 615900896 610909553 657678763 4 829696557 810959924 841612668 819869747 6 853997379 864469575 881...
output:
180
result:
ok 1 number(s): "180"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
100 4 364081200 540650381 353768306 122255830 7 936882622 937778158 941372288 943745873 947703805 938067346 944019473 7 598655091 679073706 723959930 579018281 860392698 852744534 665808681 1 557290205 3 838323287 764154463 864559801 4 952241609 888202173 792726290 886689636 6 653946054 841409940 83...
output:
175
result:
ok 1 number(s): "175"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 1 440195292 6 859787120 847131414 854112709 869067609 839981608 845676179 5 206450888 209708811 207370111 201853766 207539046 1 555976272 1 938758019 1 413646308 9 252799098 254947888 265345550 249752370 261338550 251583211 248642444 266900460 261558897 5 83936282 116530372 99708225 112074514 96...
output:
151
result:
ok 1 number(s): "151"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 1 146185204 6 852896086 841680008 855876871 835965157 843755423 851708745 1 629541324 6 85793267 91650449 93510560 99883657 85654258 98526112 3 495860961 497537876 493169484 5 454856746 450383319 452706190 450318327 452142745 6 183708510 180433221 182527046 181726412 181810362 181409052 4 692428...
output:
145
result:
ok 1 number(s): "145"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 5 689258498 593041024 495586014 514329370 820761943 7 205596594 194826463 204043065 193869609 214940002 212820377 193426959 7 765457074 564861616 742278670 649051551 719680647 625298040 628377100 7 964607721 975206807 980916305 899670280 950317349 907764973 966416652 14 583444762 587440679 37759...
output:
173
result:
ok 1 number(s): "173"
Test #13:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
100 4 333222379 411834962 321666960 375921743 6 469180085 599687470 434726418 542075515 468647205 585607083 3 329659185 334204906 442317787 7 407887487 331741182 273383133 416410227 418383971 588307977 271852141 4 865515303 869035169 860812055 861392741 5 641667472 860601686 753823004 793512791 9956...
output:
178
result:
ok 1 number(s): "178"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
100 7 690642381 613166525 688304596 634201428 562397003 633948538 679003753 4 47850900 39815477 89901918 122900559 1 531415583 6 138747627 198265925 498060210 473915860 275869244 10468108 6 855057160 887426020 927043300 863676485 864198874 851240046 5 692386595 513354859 610032533 595928682 63699127...
output:
175
result:
ok 1 number(s): "175"
Test #15:
score: 0
Accepted
time: 125ms
memory: 33256kb
input:
200000 1 158728811 3 820213140 695694229 890491786 2 223397517 576636349 3 886287626 840274568 787379583 2 531893033 375811452 4 208941903 362012920 456886582 677484638 2 658936887 741915526 1 163021123 3 102990858 99833598 128050246 2 880927685 395844417 2 582184019 506099921 2 503081931 890511277 ...
output:
371392
result:
ok 1 number(s): "371392"
Test #16:
score: 0
Accepted
time: 128ms
memory: 33140kb
input:
200000 4 527049088 576020440 539124238 528502432 4 103304993 110505705 218405655 9254609 2 531392825 552345130 2 153934319 348864359 3 326816216 71550071 319235642 2 672438614 577449099 1 987667909 4 350329232 455028270 302082072 522653010 4 897538960 713329535 762632225 710820739 3 514060771 339989...
output:
371318
result:
ok 1 number(s): "371318"
Test #17:
score: 0
Accepted
time: 127ms
memory: 31640kb
input:
200000 3 874943438 546004813 507400569 2 483105021 364422434 2 275411026 254788551 2 708265881 687362339 3 218906620 351275670 268755597 1 467105066 3 819559064 790247463 817165748 1 970131791 4 219377698 221772069 277674473 292495413 1 200146464 2 850141746 908404899 1 309046733 2 311910499 5859450...
output:
371614
result:
ok 1 number(s): "371614"
Test #18:
score: 0
Accepted
time: 120ms
memory: 31712kb
input:
200000 3 93682084 96073317 179761316 2 499962770 162915432 1 999584091 5 939952415 898712858 869060970 942886905 920106350 2 437796243 672698419 2 970505146 993912024 3 871782821 872319087 818304708 2 888310686 959163381 2 38105511 691834614 2 905703817 935917761 2 599540273 825738795 1 344807309 3 ...
output:
371671
result:
ok 1 number(s): "371671"
Test #19:
score: 0
Accepted
time: 124ms
memory: 31708kb
input:
200000 2 334259130 302821824 3 664423361 720176530 824377961 1 796836198 2 826207789 793267461 3 556670216 454153489 584319445 4 172511854 210668874 139478238 11132315 2 386520917 216809653 2 897449437 759949511 2 773459959 864938043 1 337248305 2 36892453 64751348 4 875441112 883307374 857201990 90...
output:
371431
result:
ok 1 number(s): "371431"
Test #20:
score: 0
Accepted
time: 127ms
memory: 31668kb
input:
200000 3 15180757 211957380 196307347 3 885237955 877473998 891408818 3 527959489 966372326 623116540 2 116250496 196819637 4 749133092 606791247 867630877 756654095 1 433166056 4 922504811 845536998 716730303 836804118 2 780726579 782822569 1 543764901 4 833829333 571953795 776159760 819478189 3 40...
output:
371213
result:
ok 1 number(s): "371213"
Test #21:
score: 0
Accepted
time: 120ms
memory: 31800kb
input:
200000 2 805842744 581609804 2 734227758 733064953 2 989774966 942880204 2 628257088 63946269 2 583848176 911813757 4 691317022 781500071 996319911 435048080 3 794873372 718581447 531638733 3 980221944 947251248 970539493 2 3861235 452095431 3 227824664 425339258 400130407 1 744456362 2 75860498 428...
output:
371418
result:
ok 1 number(s): "371418"
Test #22:
score: 0
Accepted
time: 127ms
memory: 33084kb
input:
200000 4 765248606 58641312 461505864 48058936 3 530497192 74608066 187318400 2 760807063 462798246 3 829369025 850399705 861318513 1 610260849 4 840112564 619362793 672743435 984829729 2 254124774 801464441 3 762528829 691988008 647617371 4 158351130 690785043 135019901 441491859 1 88740299 4 97607...
output:
371430
result:
ok 1 number(s): "371430"
Test #23:
score: 0
Accepted
time: 126ms
memory: 32568kb
input:
200000 3 260017688 247206101 245341550 3 528907971 401175380 519150579 2 751738818 699510603 2 761128342 838467598 1 671361404 4 951730690 940117575 944967225 934430806 3 273582273 423597064 390919521 3 800578214 757476170 793151055 4 154531575 169715009 226492241 234234388 3 791708466 641989170 684...
output:
371722
result:
ok 1 number(s): "371722"
Test #24:
score: 0
Accepted
time: 132ms
memory: 32368kb
input:
200000 2 77875703 98417625 1 580863835 3 328175215 539412729 441689644 4 519986810 532514024 524724699 522062026 4 495150066 502888818 208873688 519737098 1 467977355 2 481764791 265552887 3 514214795 546606435 874871364 4 157881601 327298118 568566685 173899494 1 408646380 1 248681217 2 803252090 9...
output:
371459
result:
ok 1 number(s): "371459"
Test #25:
score: 0
Accepted
time: 124ms
memory: 33064kb
input:
200000 3 617019209 617017532 617017307 3 970339026 970356059 970348843 3 558398372 558216433 558343400 2 346653959 346876820 1 281458709 1 967860014 4 475956654 475955112 475982395 475983808 3 499143819 499137223 499221662 4 723910593 723909360 723829452 724024083 3 519143186 519253790 519321105 1 5...
output:
365869
result:
ok 1 number(s): "365869"
Test #26:
score: 0
Accepted
time: 125ms
memory: 31708kb
input:
200000 3 576685712 576687248 576688432 3 767079880 767012338 767023712 2 809256364 809272790 3 394124992 394073184 394092525 2 759516270 759428114 1 895219353 3 438371420 438426848 438410444 2 310767315 310839932 1 202464867 2 603282846 603356839 1 782566135 2 650736061 650648190 3 647048066 6470414...
output:
357282
result:
ok 1 number(s): "357282"
Test #27:
score: 0
Accepted
time: 129ms
memory: 32620kb
input:
200000 2 982301221 982233632 2 911767146 911829091 2 486037419 485943061 3 505146942 505224831 505204823 1 632133123 1 489557731 2 703344129 703366051 2 650398414 650390190 3 394534473 394580673 394585491 3 126075457 125986865 126013358 3 794657480 794590085 794642851 3 787812105 787818979 787840359...
output:
361549
result:
ok 1 number(s): "361549"
Test #28:
score: 0
Accepted
time: 127ms
memory: 32948kb
input:
200000 3 913660216 914036470 913841789 3 317845899 317670209 318337619 3 94610832 94539407 94537481 3 369813385 369465271 369523389 1 68655150 2 361720346 361397713 2 841915577 842209587 3 656553414 656388735 656706235 3 612612056 612998341 613140059 1 621038044 2 349678682 348811194 2 221887705 221...
output:
370229
result:
ok 1 number(s): "370229"
Test #29:
score: 0
Accepted
time: 125ms
memory: 32872kb
input:
200000 1 5642826 3 461063276 460468925 460613639 2 640527131 640588995 2 671932901 672143977 1 903027019 3 540766029 540483743 540269503 2 207757030 208217727 4 861139257 861051707 861078118 861077332 2 481255334 480974330 4 362981126 362943325 363022442 362988716 3 32203238 31650608 31764601 3 2866...
output:
369419
result:
ok 1 number(s): "369419"
Test #30:
score: 0
Accepted
time: 126ms
memory: 33280kb
input:
200000 2 505843259 505239454 3 723724918 723066584 723626111 1 86353949 2 214624116 214296544 3 167340181 167349779 167349587 2 350159908 350055188 3 379611811 379777377 379736400 2 876593838 876020897 2 963121551 963616157 2 936958144 937428994 2 689150609 688504031 2 9155490 8854750 2 609202639 60...
output:
370156
result:
ok 1 number(s): "370156"
Test #31:
score: 0
Accepted
time: 128ms
memory: 33224kb
input:
200000 2 421023837 420532799 3 531618132 531445793 531709271 1 916087065 2 699008541 698624333 2 555767036 555551138 3 620708586 620458919 620677285 2 881807045 881737135 3 486057243 485868230 485677837 2 507150411 507385192 3 89817461 89710261 89983728 3 290522225 290842137 290675086 2 705362131 70...
output:
368946
result:
ok 1 number(s): "368946"
Test #32:
score: 0
Accepted
time: 126ms
memory: 31868kb
input:
200000 2 905633261 905206014 3 575923853 575782402 576003616 1 575598461 1 834510366 3 144611707 144515175 144650402 1 384852119 4 205355179 205334200 205501346 205449577 2 270991591 271127063 2 495751300 495484348 4 678430204 678417774 678431544 678361285 2 445073250 444680651 3 480881024 481306492...
output:
368270
result:
ok 1 number(s): "368270"
Test #33:
score: 0
Accepted
time: 130ms
memory: 32816kb
input:
200000 1 626521854 2 985585113 985627840 3 528981816 529078225 529059028 4 931259243 931256646 931257141 931272876 2 5007153 4940473 1 839142863 2 867034659 866845260 2 953839484 953953044 2 739864025 739996079 2 883921952 884014431 1 261276759 3 527037541 527045605 527036030 2 366891875 366795240 2...
output:
365216
result:
ok 1 number(s): "365216"
Test #34:
score: 0
Accepted
time: 128ms
memory: 33260kb
input:
200000 3 130403137 130366909 130194098 3 444112904 444337243 444072211 2 768086779 767960882 2 406264114 406110368 3 437808387 437884200 438028260 5 978027579 977966850 977965648 978112580 978097916 2 153010807 153103181 3 220787828 221103689 221093744 2 235703371 235785772 4 771852620 771566039 771...
output:
367761
result:
ok 1 number(s): "367761"
Test #35:
score: 0
Accepted
time: 134ms
memory: 32900kb
input:
200000 5 558945239 558945928 558943942 558945170 558945737 2 389787163 389792339 2 74806397 74808912 2 55617410 55611498 1 324837485 3 754994327 754992763 754989423 2 363304227 363296230 3 808094401 808092569 808094084 3 410017026 410019024 410018730 4 898729558 898732123 898729121 898737342 2 38193...
output:
276845
result:
ok 1 number(s): "276845"
Test #36:
score: 0
Accepted
time: 138ms
memory: 32192kb
input:
200000 2 518360824 518358206 2 191668672 191669366 2 935996045 935994928 1 850383035 1 788218187 3 663684476 663685267 663684584 1 162622934 3 787962954 787963115 787963294 3 25278834 25278408 25277667 2 63992522 63992288 1 663818394 4 593268425 593267729 593267039 593268062 2 318922332 318923592 3 ...
output:
236492
result:
ok 1 number(s): "236492"
Test #37:
score: 0
Accepted
time: 138ms
memory: 32180kb
input:
200000 4 267231572 267233362 267231090 267232229 3 369507739 369514281 369508814 4 201172110 201172200 201172181 201172131 2 491220938 491216192 2 730896077 730890252 2 612884415 612879742 1 536950252 4 575368661 575370232 575370393 575369157 4 257033226 257030222 257033180 257031916 3 585294372 585...
output:
273351
result:
ok 1 number(s): "273351"
Test #38:
score: 0
Accepted
time: 139ms
memory: 32528kb
input:
200000 3 566095999 566092870 566094678 3 984068387 984070345 984069502 3 138323865 138323833 138322973 2 542288406 542290327 2 507765539 507764712 2 713224135 713223325 3 928733270 928735231 928735267 2 957120558 957118498 3 969011138 969013422 969008960 3 402754725 402758793 402759300 3 399627655 3...
output:
254345
result:
ok 1 number(s): "254345"
Test #39:
score: 0
Accepted
time: 138ms
memory: 32392kb
input:
200000 2 392294863 392290519 3 925295549 925295237 925293414 3 31291412 31290096 31290048 3 503130208 503130989 503130920 1 854299590 2 186631704 186636077 2 483487036 483491802 2 309616236 309619439 3 240744850 240745700 240747833 3 888531868 888533414 888529049 1 103607824 3 41224178 41226677 4122...
output:
256177
result:
ok 1 number(s): "256177"
Test #40:
score: 0
Accepted
time: 136ms
memory: 32064kb
input:
200000 2 103843152 103845730 3 879227516 879228541 879229642 3 494916225 494918201 494919305 3 146769932 146766491 146766576 2 173619997 173615931 4 185620583 185620918 185623038 185620715 3 193142038 193138810 193141945 2 563557506 563560017 2 1908290 1905465 2 280707691 280704304 4 223205511 22320...
output:
250398
result:
ok 1 number(s): "250398"
Test #41:
score: 0
Accepted
time: 132ms
memory: 33132kb
input:
200000 2 696528247 696522824 1 178935789 4 36387478 36386591 36382883 36387422 2 86570813 86568209 4 989298652 989294069 989294917 989295041 1 65114809 2 755158941 755158878 1 186946953 3 176201064 176203737 176201942 2 944603662 944607202 2 575524708 575519520 4 766842235 766842590 766842354 766842...
output:
271959
result:
ok 1 number(s): "271959"
Test #42:
score: 0
Accepted
time: 137ms
memory: 32104kb
input:
200000 3 749205719 749202912 749203829 2 5377061 5377245 3 503264299 503266067 503266433 3 632554834 632556461 632556153 4 965476893 965477329 965477317 965477446 3 208932812 208932527 208934029 3 795257538 795253978 795254287 2 138721042 138723986 2 658527364 658526206 3 996446437 996442493 9964436...
output:
262249
result:
ok 1 number(s): "262249"
Test #43:
score: 0
Accepted
time: 139ms
memory: 33384kb
input:
200000 3 964057743 964057976 964057406 2 805606333 805606172 4 142444963 142444747 142444846 142445104 2 82101268 82101634 3 62177317 62177601 62177813 5 410442213 410442190 410442012 410442356 410442120 2 753639083 753639435 2 700591198 700591224 4 565412060 565412399 565412262 565411998 1 96467795...
output:
210596
result:
ok 1 number(s): "210596"
Test #44:
score: 0
Accepted
time: 137ms
memory: 32636kb
input:
200000 2 968575583 968578668 4 160579109 160578771 160580539 160579230 1 755666097 2 894917692 894917969 4 578187568 578186486 578184905 578188301 2 401064917 401063343 2 667538593 667540787 2 570054428 570051584 4 756751493 756755077 756755343 756752274 1 985868889 2 959546854 959547389 3 852668978...
output:
247557
result:
ok 1 number(s): "247557"
Test #45:
score: 0
Accepted
time: 117ms
memory: 31816kb
input:
200000 2 60882 60874 2 358279 358263 2 64170 64172 2 123201 123195 2 371206 371213 2 61094 61091 2 391694 391686 3 196668 196666 196667 2 80737 80738 2 199176 199184 2 294108 294086 2 212112 212122 2 75899 75908 2 225488 225470 2 127616 127614 3 317897 317905 317898 2 379444 379430 2 300111 300112 3...
output:
329555
result:
ok 1 number(s): "329555"
Test #46:
score: 0
Accepted
time: 118ms
memory: 31316kb
input:
200000 2 209467 209468 2 164157 164149 2 184342 184349 2 164156 164158 2 110706 110710 2 39463 39460 2 113928 113927 2 205838 205841 2 306143 306129 4 275406 275403 275408 275404 2 412541 412538 2 317739 317741 3 291160 291156 291150 2 82119 82083 2 278898 278892 2 212102 212097 2 313587 313599 2 59...
output:
329719
result:
ok 1 number(s): "329719"
Test #47:
score: 0
Accepted
time: 122ms
memory: 31696kb
input:
200000 3 137698 137700 137702 3 278579 278584 278586 2 49291 49294 2 343508 343506 2 158542 158544 2 98799 98795 2 223047 223048 2 153272 153280 2 308769 308766 4 429434 429433 429429 429432 2 221383 221377 2 249481 249482 3 120759 120760 120757 2 47343 47341 2 429817 429818 2 232253 232265 2 111212...
output:
328843
result:
ok 1 number(s): "328843"
Test #48:
score: 0
Accepted
time: 123ms
memory: 32040kb
input:
200000 2 47775 47777 2 411748 411747 2 267044 267045 2 195305 195306 2 311467 311462 3 278212 278214 278215 2 400302 400304 2 213026 213020 3 79161 79165 79174 2 316138 316147 2 343527 343540 2 93576 93577 2 135788 135794 2 374451 374469 2 329940 329947 2 81335 81333 2 291446 291444 2 103486 103492 ...
output:
329511
result:
ok 1 number(s): "329511"
Test #49:
score: 0
Accepted
time: 125ms
memory: 31580kb
input:
200000 2 125118 125109 2 360649 360650 2 276295 276294 2 160863 160885 3 104093 104095 104096 2 341881 341883 2 211049 211039 2 326973 326965 2 71497 71499 3 418856 418852 418854 2 202609 202604 2 24380 24376 2 46054 46043 2 324577 324573 2 304157 304163 2 373801 373800 2 70889 70888 2 219323 219336...
output:
329628
result:
ok 1 number(s): "329628"
Test #50:
score: 0
Accepted
time: 121ms
memory: 31660kb
input:
200000 2 391330 391316 2 51499 51495 2 94596 94598 2 44958 44956 2 377568 377565 4 226057 226080 226056 226047 2 194333 194336 2 60439 60448 3 429538 429536 429537 3 333095 333096 333094 2 413331 413335 2 47038 47036 2 306045 306051 3 427858 427854 427861 4 347978 347977 347976 347975 2 33092 33094 ...
output:
329751
result:
ok 1 number(s): "329751"
Test #51:
score: 0
Accepted
time: 121ms
memory: 32820kb
input:
200000 2 60520 60518 2 136931 136919 2 203304 203303 3 283564 283573 283577 3 92060 92056 92058 3 410733 410736 410728 2 397291 397287 2 40980 40969 2 96117 96121 3 193303 193297 193306 2 191390 191386 2 188085 188078 2 43791 43799 2 394779 394753 3 276707 276709 276703 2 134677 134672 2 238373 2383...
output:
329363
result:
ok 1 number(s): "329363"
Test #52:
score: 0
Accepted
time: 123ms
memory: 32936kb
input:
200000 2 186130 186138 3 394334 394332 394326 2 67803 67800 2 339923 339920 2 25482 25483 2 425823 425818 2 400302 400303 2 431044 431025 2 378983 378976 3 217733 217743 217714 2 355042 355027 4 108284 108293 108281 108269 2 129544 129541 2 57799 57800 2 385629 385628 2 22049 22052 3 309175 309176 3...
output:
329231
result:
ok 1 number(s): "329231"
Test #53:
score: 0
Accepted
time: 121ms
memory: 32940kb
input:
200000 2 260916 260952 2 103316 103313 2 370073 370104 2 185152 185166 2 356449 356446 2 333940 333945 2 394251 394253 2 124769 124778 2 44947 44948 2 272206 272207 2 242641 242649 2 308854 308861 2 324622 324621 2 116349 116345 3 372498 372490 372492 2 298308 298307 2 314143 314144 2 260125 260130 ...
output:
328963
result:
ok 1 number(s): "328963"
Test #54:
score: 0
Accepted
time: 123ms
memory: 31500kb
input:
200000 2 76557 76561 2 125939 125943 2 264252 264248 2 306335 306347 2 341099 341098 2 393964 393947 2 376078 376070 2 56016 56020 2 141103 141101 3 229993 229994 229992 2 269000 268999 2 58463 58455 2 13958 13964 2 221296 221303 2 100418 100390 2 181695 181696 2 336353 336355 2 330630 330627 2 3042...
output:
329632
result:
ok 1 number(s): "329632"
Test #55:
score: 0
Accepted
time: 118ms
memory: 32276kb
input:
200000 2 234887 234844 2 42359 42362 2 409066 409023 2 36319 36527 2 302358 302377 2 357421 357425 2 251030 250929 2 87871 87824 2 380558 380454 2 261125 261104 2 76831 76818 2 341787 341795 2 89627 89644 2 48047 48077 2 242731 242730 2 161542 161566 2 363865 363885 2 75419 75443 2 140803 140692 2 9...
output:
375679
result:
ok 1 number(s): "375679"
Test #56:
score: 0
Accepted
time: 122ms
memory: 31612kb
input:
200000 2 277517 277524 2 149538 149545 2 59127 59122 2 247347 247329 2 26808 26811 2 226672 226744 2 293996 293907 2 368487 368482 2 197717 197744 2 696 628 2 417312 417289 2 2097 2042 2 170863 170859 2 407358 407423 2 381707 381703 2 50472 50475 2 398101 398099 3 34136 34143 34124 2 41916 41934 3 1...
output:
376859
result:
ok 1 number(s): "376859"
Test #57:
score: 0
Accepted
time: 116ms
memory: 32444kb
input:
200000 3 143263 143321 143378 2 304706 304695 2 32426 32424 2 69792 69849 3 200904 200980 200951 2 148576 148873 2 68195 68202 2 98532 98518 2 203709 203715 2 282914 282908 2 253475 253417 2 273571 273494 3 180620 180632 180605 2 182755 182753 2 62942 62714 2 249915 249892 2 270233 270202 2 243071 2...
output:
376603
result:
ok 1 number(s): "376603"
Test #58:
score: 0
Accepted
time: 117ms
memory: 31808kb
input:
200000 2 102372 102443 2 109676 109703 2 56259 56087 2 191201 191058 2 181141 181134 2 347788 347765 2 43462 43450 2 158056 158055 2 211383 211398 2 322177 322223 2 170348 170242 2 212540 212492 2 51001 51156 2 241429 241423 2 320280 320283 2 296963 296958 2 397019 396780 2 112220 112085 2 99142 991...
output:
376017
result:
ok 1 number(s): "376017"
Test #59:
score: 0
Accepted
time: 114ms
memory: 31476kb
input:
200000 2 292983 292974 2 333736 333713 2 385862 385895 2 52958 52953 2 274316 274293 2 400653 400663 2 387363 387278 2 277488 277105 2 142230 142242 2 286632 286622 3 399439 399250 399278 2 393523 393471 2 81289 81352 2 30728 30785 2 349156 349147 2 417574 417413 2 189669 189512 2 255286 255303 2 13...
output:
376629
result:
ok 1 number(s): "376629"
Test #60:
score: 0
Accepted
time: 115ms
memory: 31236kb
input:
200000 2 180762 180763 2 147080 147205 2 156238 156231 2 345705 345579 3 10655 10741 10593 2 90763 90617 2 29043 28891 2 311172 311633 3 198459 198426 198468 2 359385 359356 2 16641 16640 2 197431 197427 2 260247 260226 2 329047 329129 2 117171 117181 2 152907 152920 2 173688 173658 3 18346 18362 18...
output:
376264
result:
ok 1 number(s): "376264"
Test #61:
score: 0
Accepted
time: 112ms
memory: 32388kb
input:
200000 3 404776 404695 404658 2 221062 221025 2 4751 4757 3 305839 305982 305776 2 238081 238101 2 186285 186287 2 180997 180933 2 30366 30416 2 88997 88998 2 9130 9132 2 350714 350783 2 13991 13955 2 54124 54100 2 377416 377378 2 278983 278941 2 342532 342500 2 418543 418549 3 351184 351181 351172 ...
output:
377018
result:
ok 1 number(s): "377018"
Test #62:
score: 0
Accepted
time: 120ms
memory: 32084kb
input:
200000 2 73828 73754 2 183506 183504 2 204539 204543 2 374005 374013 2 32584 32525 2 83365 83375 2 40294 40282 2 271127 271112 2 248154 248173 2 416572 416573 2 52415 52383 2 236081 236096 2 297434 297398 2 371603 371600 3 275944 275943 275962 2 197492 197416 2 272011 272007 2 111402 111322 2 211072...
output:
375033
result:
ok 1 number(s): "375033"
Test #63:
score: 0
Accepted
time: 124ms
memory: 31752kb
input:
200000 3 210302 210200 210157 2 196286 196267 2 393486 393354 2 137253 137261 2 26900 26855 2 275392 275409 2 412138 412105 2 158964 158958 2 153281 153304 2 279259 279254 2 165872 165877 2 130299 130305 2 207852 207855 2 226290 226286 2 36944 36908 3 25354 25331 25332 2 20662 20706 2 250344 250400 ...
output:
375542
result:
ok 1 number(s): "375542"
Test #64:
score: 0
Accepted
time: 120ms
memory: 32516kb
input:
200000 2 51646 51582 2 16929 16959 2 30476 30482 2 414212 414180 2 64058 64081 2 61442 61446 2 127944 127860 2 163753 163840 2 297274 297285 2 191820 191830 2 143792 143819 2 418652 418612 2 308680 308659 2 212249 212252 2 254382 254316 2 393096 393129 2 261339 261456 2 386611 386748 2 170037 170113...
output:
376423
result:
ok 1 number(s): "376423"
Test #65:
score: 0
Accepted
time: 117ms
memory: 32432kb
input:
200000 2 57318 53865 2 260825 258959 2 361209 361660 2 193297 193239 2 300126 300245 3 199518 198873 201141 2 155578 155942 2 172833 173118 4 275695 276481 276459 276210 2 232600 232536 3 369083 369066 368680 2 368595 369546 2 37241 37129 2 404952 405269 2 212815 213109 2 242701 243984 2 89299 89629...
output:
397499
result:
ok 1 number(s): "397499"
Test #66:
score: 0
Accepted
time: 117ms
memory: 31896kb
input:
200000 2 194347 194311 2 148763 148607 2 374711 374129 2 203279 202900 2 309866 309982 2 100860 100567 2 18521 18573 3 48502 49052 50320 2 270985 270941 2 72948 73022 2 258420 259839 2 409664 409888 2 301188 301095 2 131875 131843 2 259938 259985 2 395756 395566 2 60705 60851 2 297891 297826 2 87651...
output:
396769
result:
ok 1 number(s): "396769"
Test #67:
score: 0
Accepted
time: 114ms
memory: 31764kb
input:
200000 2 225334 224648 2 22342 22091 2 218214 218354 2 408490 408757 3 341504 341646 341439 3 108128 109278 108054 2 356460 356816 2 126091 127137 2 297021 297642 2 54787 55945 2 167767 167862 2 342765 343221 2 76498 76466 2 357539 357544 2 213947 214495 3 229192 229135 229217 3 36041 36077 36086 2 ...
output:
396428
result:
ok 1 number(s): "396428"
Test #68:
score: 0
Accepted
time: 117ms
memory: 31688kb
input:
200000 2 139013 138915 2 223293 223336 2 121149 120915 2 141744 142609 2 237243 237399 2 250580 250286 2 361693 361728 2 254951 255133 2 171190 171194 2 56761 56779 2 212813 213007 2 350764 350809 2 150611 147675 2 148176 148872 2 287177 287284 2 137965 137983 2 97703 98287 2 336520 336628 2 379788 ...
output:
396315
result:
ok 1 number(s): "396315"
Test #69:
score: 0
Accepted
time: 116ms
memory: 31292kb
input:
200000 2 336707 336934 2 38295 38976 2 420320 419556 2 371111 370525 2 80510 80289 2 200501 200518 2 27578 27003 2 270097 269839 2 378835 378465 2 368870 369696 2 378602 378411 2 368352 368599 2 339652 339405 2 120995 120952 2 377086 376463 2 407659 406755 2 27011 27110 2 72704 72765 2 3836 4097 2 2...
output:
397048
result:
ok 1 number(s): "397048"
Test #70:
score: 0
Accepted
time: 117ms
memory: 31268kb
input:
200000 2 190233 190299 2 257862 257855 2 407255 404663 2 285662 285636 2 332870 333588 2 8884 8833 2 339364 339610 2 258328 258284 2 351451 351940 2 73557 73807 2 101973 100367 2 129593 129682 2 46319 44732 2 216541 215257 2 49596 51821 2 359135 359036 2 403837 405095 2 131536 135292 2 232980 232800...
output:
396717
result:
ok 1 number(s): "396717"
Test #71:
score: 0
Accepted
time: 113ms
memory: 32180kb
input:
200000 2 138791 138209 2 338873 338841 2 253216 253252 3 327666 326862 326723 2 102682 101877 2 230018 230129 2 111253 111923 3 342523 343435 343082 2 133668 133961 2 50013 50459 2 243969 243694 2 11674 11320 2 33928 34152 2 52279 52104 2 169450 169245 2 300064 299990 2 23146 25221 2 5558 5698 2 106...
output:
396501
result:
ok 1 number(s): "396501"
Test #72:
score: 0
Accepted
time: 112ms
memory: 31132kb
input:
200000 2 151940 152490 2 111313 111772 2 129025 128488 2 384262 384249 2 271580 271568 2 306547 307337 2 237919 237940 3 412662 411603 413264 3 388399 388095 388273 2 62914 64139 2 266210 266224 2 27859 27099 2 245043 244965 2 123199 122789 2 381589 381594 2 418953 418970 2 121963 122104 2 46104 458...
output:
396024
result:
ok 1 number(s): "396024"
Test #73:
score: 0
Accepted
time: 114ms
memory: 32872kb
input:
200000 2 396937 397309 3 113107 112789 112461 2 363210 363492 2 341938 341809 2 333796 333866 2 272825 273002 2 208268 208314 2 261366 260829 2 273569 273564 2 151060 151276 2 243619 243267 2 184292 184838 2 2572 2357 2 18616 18800 2 263948 263939 2 136663 137229 2 43447 43686 2 240469 240118 3 7637...
output:
396338
result:
ok 1 number(s): "396338"
Test #74:
score: 0
Accepted
time: 116ms
memory: 32000kb
input:
200000 2 139256 139234 2 132623 132257 2 273527 273456 2 340641 340711 2 401607 401661 2 352668 352452 2 364770 364791 2 387852 387439 3 246814 246987 246957 2 32995 32991 2 241572 241671 2 380533 380035 3 286950 288850 288013 2 376580 376636 2 274959 274866 2 24391 24345 2 91670 91596 2 201381 2006...
output:
396247
result:
ok 1 number(s): "396247"
Test #75:
score: 0
Accepted
time: 121ms
memory: 31336kb
input:
200000 3 240378 240369 240375 2 5727 5723 2 298865 298866 2 256554 256553 2 115467 115469 2 437827 437802 2 286400 286396 2 103776 103774 2 426978 426971 2 106194 106187 3 34275 34277 34273 2 144131 144126 2 401757 401752 2 407615 407613 2 47845 47834 2 5491 5495 3 323395 323403 323402 2 82493 82491...
output:
306211
result:
ok 1 number(s): "306211"
Test #76:
score: 0
Accepted
time: 126ms
memory: 32000kb
input:
200000 2 230905 230904 2 228192 228195 2 72035 72029 3 362423 362424 362425 2 228476 228481 3 325312 325311 325314 3 315431 315432 315428 3 97165 97167 97168 2 410110 410106 2 360792 360800 2 234993 235000 2 418578 418584 2 11933 11958 2 107305 107307 2 271683 271680 2 428299 428310 2 226360 226359 ...
output:
306516
result:
ok 1 number(s): "306516"
Test #77:
score: 0
Accepted
time: 123ms
memory: 32576kb
input:
200000 2 201269 201266 2 232592 232598 2 357213 357217 3 169963 169956 169942 2 222662 222664 2 62537 62528 2 117788 117786 2 126537 126540 2 422974 422975 2 227636 227640 2 178578 178577 2 350181 350186 2 397290 397299 2 59650 59653 2 82497 82493 3 123918 123926 123923 2 76687 76681 2 132805 132804...
output:
306461
result:
ok 1 number(s): "306461"
Test #78:
score: 0
Accepted
time: 128ms
memory: 32468kb
input:
200000 2 67103 67104 2 97250 97244 2 347416 347430 2 212026 212014 2 414338 414333 2 37226 37225 2 349017 349020 2 370787 370784 2 203159 203149 3 440668 440666 440667 2 91063 91067 2 194264 194262 3 171213 171209 171211 2 393245 393246 2 284884 284883 2 341320 341318 2 147053 147059 3 195966 195965...
output:
306653
result:
ok 1 number(s): "306653"
Test #79:
score: 0
Accepted
time: 127ms
memory: 32748kb
input:
200000 2 135615 135619 3 349272 349273 349271 2 273449 273440 3 164058 164060 164040 2 386232 386224 2 224729 224753 2 85739 85768 2 57933 57925 2 305402 305399 2 322553 322556 2 126866 126862 2 25936 25927 3 226337 226331 226334 2 49864 49867 3 24965 24961 24963 3 139026 139034 139025 2 184002 1839...
output:
306439
result:
ok 1 number(s): "306439"
Extra Test:
score: 0
Extra Test Passed