QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#481965#547. BM 算法jxy2012AC ✓102ms4388kbC++231.5kb2024-07-17 16:29:332024-12-28 21:43:11

详细

Test #1:

score: 100
Accepted
time: 51ms
memory: 3972kb

input:

10000
481761257 325845401 89198273 331256176 423285801 510703206 160079009 805700484 2785453 119847482 4456012 47414124 382685410 463638256 314056646 483110670 723760177 473280072 294639899 965560586 243267953 822936984 475063108 193430844 842374415 125382693 569285769 643640101 548245375 253979925 ...

output:

2774
519996520 676098795 636816471 494383311 88254187 542188011 442632990 847848618 639292958 22724161 734302549 364991396 926096346 988368003 304154451 342281483 623977164 383132553 297361731 782343399 865656753 547123615 620909076 813317753 466953279 371327965 118623130 665641245 786523122 6711004...

result:

ok good job!

Test #2:

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

input:

10000
957725520 854846291 969491053 356250398 691705616 213195336 580768790 67132468 874683049 587263928 159905787 591245052 44365380 800142401 225588361 208452961 739469465 130683730 284272807 107327163 183355931 936856467 6990073 292261808 892473264 530135765 586566900 505038785 964987342 62958872...

output:

5000
936422497 547236824 341406214 369258274 484725247 972517217 181146487 910209592 456507746 267678502 41616376 160273347 419188724 933646550 667327536 341847329 931087231 290299432 934826830 431390305 433294654 893889005 455503084 857782557 200292540 937545096 40119328 203327821 100447808 7254532...

result:

ok good job!

Test #3:

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

input:

10000
468567402 615227461 825790121 924536374 466843001 364872472 35783838 961206768 601425855 669469693 62533267 931605325 103463216 694776506 491182366 643726023 831922439 24457246 734138378 688617551 395538864 825956960 628023036 153322223 40900393 729283507 371038750 903379206 201996039 14948678...

output:

5000
176737565 161081663 671601904 990035167 336342077 215279973 542545314 430344662 988843213 667237563 55942639 830068892 135667082 860076600 568449487 589641911 411357767 412294494 472204428 378696549 921720714 775438839 7666416 805057129 775100797 243577325 271813539 66555713 24980583 427937651 ...

result:

ok good job!

Test #4:

score: 0
Accepted
time: 101ms
memory: 4388kb

input:

10000
69862984 293611926 403004942 463746003 659628869 670460967 974517991 836756407 872315054 303957729 818948017 132026024 608732344 851995441 921247689 300940657 282980343 533588021 231159141 115601907 161346426 965077118 434900526 804152885 533402643 800086212 897870234 659037755 680872901 65225...

output:

5000
822982633 916462835 946431456 289298678 740903269 825608691 712437716 477886717 267612008 25532735 399515671 685320521 249164778 236332095 793052999 714890750 328292696 457830762 548947455 942276699 880397529 356861656 414511580 505301182 731831813 453848666 202680506 836744452 151626484 224897...

result:

ok good job!

Test #5:

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

input:

10000
302610832 195739555 615926253 945276664 433921214 311571850 628494857 599350354 254090811 942941793 189235408 988101968 858805828 827202076 722754803 149002706 299639408 232447563 578318640 74552395 281140007 322226109 905781990 803107348 319318654 214252035 766487192 661593943 700418938 30726...

output:

5000
38710211 433371254 770617667 894622533 506999622 75120448 562087008 673731892 209616835 617734077 439986020 986917643 606256566 877592192 761977015 345533913 616989089 885801084 694114705 310212542 844414415 394906882 997618196 280338788 406061873 723672163 649961464 559092718 751533765 4714706...

result:

ok good job!

Test #6:

score: 0
Accepted
time: 96ms
memory: 4104kb

input:

10000
194896228 365691994 70573349 52066983 251370641 592635286 802370214 371278914 534032008 470173258 818664030 633926171 148741371 375736605 776542446 937276745 742949876 77010768 900860596 707193546 862212465 211006831 177123515 903854249 413455739 375289098 531661615 604267091 797158809 8909089...

output:

5000
812822712 586483437 833582293 577080516 298821734 311325820 479709382 782299002 639366996 225719979 147311531 662755215 223354168 153552690 567691264 172872587 121495514 819241620 929153708 656330183 455494083 357201197 115773893 610629481 208052811 120870683 924536328 779744326 705348341 71036...

result:

ok good job!

Test #7:

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

input:

10000
173682722 823239462 497261788 898490895 314555842 291743840 613638047 537082136 503296908 440934740 696542803 824708774 566603947 485620288 300818184 921570494 375405522 250256317 338078768 267431337 658768476 575964387 951479366 104388069 431325614 792083015 145946469 191033122 507972995 8860...

output:

5000
622983105 419961048 779189825 998042003 511383687 353285962 10945139 208097340 356523902 334244213 266071237 573537795 365466769 109830176 552887412 812278625 379749717 88754069 496373264 704448312 576498342 795802304 23148550 474550776 685383793 201002379 4800191 941967405 258206110 360837778 ...

result:

ok good job!

Test #8:

score: 0
Accepted
time: 102ms
memory: 4040kb

input:

10000
180872957 339943670 923666064 417992982 339533575 775349576 329510000 145625425 573569765 211500590 566445810 792794434 591183709 175028313 71864328 205913803 412983706 877885019 215279970 819322422 506671586 833345512 699039480 622660968 476099555 475758623 612686236 856117219 759055458 15866...

output:

5000
178629068 735788081 177730217 472379685 664570124 110302672 772226376 133124469 207588430 516476180 138551161 49985805 186098800 962938773 251452181 769082008 903412717 566142900 2142661 717153244 804915602 862184302 464123997 260798371 630412471 767911856 512399332 720232019 773929692 42142738...

result:

ok good job!

Test #9:

score: 0
Accepted
time: 101ms
memory: 4140kb

input:

10000
291189140 310412941 109147063 234599709 330358548 245178015 187231724 118497705 670984353 875636623 681806958 827074754 646536850 515308282 940260328 708983658 355335611 996527156 803147102 65525572 498477971 694445854 673857882 352662978 215416891 937755117 586731991 970486963 116242599 80591...

output:

5000
868146164 270404693 792626689 364330603 990918141 378549134 531452817 169265903 494698318 864843694 921665300 413410149 560041300 718655252 803384773 975257727 922952249 255241619 485304729 792609465 575934316 697173349 629681973 146249915 993599803 629220147 944711988 261474593 732632786 73509...

result:

ok good job!

Test #10:

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

input:

10000
99628167 17871381 477754729 823487682 163833037 443497093 877969926 901793571 265264653 557880451 253335762 503940775 965234905 635123159 841382197 666022146 667190979 864511439 625446884 729504121 579523530 534312522 204572066 747448465 88325700 392039741 342065376 128926252 143283083 9524540...

output:

5000
58819749 60069029 826178095 837675996 480864832 839386077 594112829 248668071 124419413 182598368 181808200 585764038 310130534 371417338 214312854 917056859 554170735 781181333 251347899 715978057 801862002 808390433 861114329 455984888 87557345 284033592 368184357 720080608 786750917 23130877...

result:

ok good job!

Test #11:

score: 0
Accepted
time: 97ms
memory: 4044kb

input:

10000
981720654 486851988 423085817 305424429 229274760 911398813 54273722 516498837 168853392 505136195 418929257 769673344 430797694 908076834 651077186 624043582 612492865 137464577 577117295 3077674 246604333 570755320 164513746 949001351 256474379 182695561 9496924 395282535 444743691 724782360...

output:

5000
458045525 526937577 624551565 483832986 562865960 65811406 503036102 717835721 123682111 751743733 982257394 222271887 283347966 545983586 604125284 627872799 111979985 357460979 995824125 225633372 107672338 452853298 142882156 464619960 232334320 744707203 770656063 375419295 17596287 9531831...

result:

ok good job!

Test #12:

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

input:

10000
377957992 230735870 772819998 993198239 360968885 378226178 886315386 228008333 144745061 641762685 397935071 922736446 523431856 488694995 883193240 462320640 141474228 444154151 788323626 661135743 226247281 156277129 85788520 625038763 744947170 913201034 172630470 371511206 832939892 77408...

output:

5000
393784191 327611113 746428186 68561236 411757545 696264 109358442 375491239 739219265 726979658 151378012 583573520 223885538 871759378 503101329 236336754 723214666 322758209 396555935 206008246 571674370 246676759 398763599 602969282 962989938 197277305 259328931 511466876 153483063 90104143 ...

result:

ok good job!

Test #13:

score: 0
Accepted
time: 101ms
memory: 4140kb

input:

10000
915846929 265862453 90423096 243585370 971578883 885628335 460190028 120633820 699582999 765042464 717239292 217866398 939707644 488047543 956758075 673960306 741412460 928085904 638426299 810463610 514252660 540402624 475692835 969861072 574746419 815272205 226039098 180344861 450371329 19390...

output:

5000
70431865 188490730 199293690 370493257 624953047 736407269 12756864 319486825 254804393 261209960 874662729 407862807 335048075 565077285 976278322 19696662 92111751 587455216 851510292 56939259 585699551 268866018 582893545 35843616 442627680 814531821 9046956 558533752 333683825 519774911 280...

result:

ok good job!

Test #14:

score: 0
Accepted
time: 101ms
memory: 4140kb

input:

10000
994467050 345579150 368407658 822508970 227318746 113808913 22746242 348704395 883368358 714835147 503065644 194474178 780502268 433260222 638121661 336797014 636132928 846071542 663037324 142402894 445584362 68372299 510178125 203420803 127227056 914670253 593408957 328806860 390758916 513613...

output:

5000
497815007 456892307 537995517 373060155 722783942 942040616 694672938 700332074 329593775 121653589 591311455 958548932 871010143 701007724 404240217 957527324 402771947 901411244 365504958 132915459 544158395 59271791 585026427 779704389 826931701 947652461 448404496 163927230 476411185 961758...

result:

ok good job!

Test #15:

score: 0
Accepted
time: 97ms
memory: 4056kb

input:

10000
422321407 874394669 424297648 172859345 273647214 190897162 559947796 449542846 112460126 946375780 984079597 610596519 714558923 347032404 121312306 330426000 149791827 512286657 376940868 713079105 867945071 868579686 620169139 257603123 893494417 452555681 888893820 442451361 47755329 94180...

output:

5000
241920122 802421024 923265635 903375090 278912732 462302400 238341102 404910590 471473885 538412797 418213874 264602267 535270781 450928677 96303476 948866605 224019956 417530486 252693026 864114249 527357349 266871358 901882905 887751772 757697280 933853925 656311923 952886930 628553199 669012...

result:

ok good job!

Test #16:

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

input:

10000
284535580 904733529 407516463 760176463 12497548 96996750 326237736 770765595 804123903 917411039 82310503 272960190 933904784 296938585 447657802 84352574 461473873 894856552 567017606 799210461 369489990 708397386 7757883 181367404 605182665 225382946 187583443 395599958 746823867 809189320 ...

output:

5000
966657922 239335368 940745769 945041235 614431578 311989574 941865519 265845586 771655443 881692247 832437485 213199525 915687329 177438804 51468891 342630901 845406988 736086706 84169261 46010212 151342619 770873214 786152246 130807916 420362251 577845535 615103711 759266908 986980701 71305854...

result:

ok good job!

Test #17:

score: 0
Accepted
time: 101ms
memory: 3984kb

input:

10000
143402562 710493128 887681468 532235816 11250361 343965675 646233797 181000080 666275055 946724519 145129714 10485344 98155157 537369885 832915199 98115788 710792633 109334564 1763953 506332992 872077306 162316709 677083289 384734909 405706417 907445544 890927000 402847518 315194042 173085581 ...

output:

5000
636910087 995175793 860437888 296451485 675465101 326861271 41188858 562190693 785737943 275081337 303752210 448164916 961865439 876294614 961732983 716216838 886101133 935101217 407380018 270715323 879110972 961807818 113773537 700437861 216325444 321286709 547997131 105301682 231255973 375545...

result:

ok good job!

Test #18:

score: 0
Accepted
time: 101ms
memory: 4104kb

input:

10000
52647847 844512611 280928302 751557005 420466432 861986872 267896994 4240313 817817481 927655515 851858557 870133599 198036189 805740294 140712607 921128264 844983674 978125074 888858650 948450794 687344982 737245781 339660667 541639603 892892906 50615330 216916882 220287793 633969604 25224287...

output:

5000
751619741 344890769 229779255 454639758 590087669 323280649 567963272 14045010 613455209 236314281 756378327 712734467 387043710 338659182 203691097 850808127 87783396 962277655 378393661 366506619 898439404 829341680 776067662 982211573 370033926 825506235 239870914 570126260 270908525 7108865...

result:

ok good job!

Test #19:

score: 0
Accepted
time: 93ms
memory: 4100kb

input:

10000
487583046 344693028 826880083 929392262 867951520 408064391 400765869 73124285 895519401 1134312 626909117 156750276 216501935 876445227 142304635 290995429 372199598 28663296 402137325 927614574 350671865 210948669 825856676 215108238 134526265 197222945 164795341 196100988 468597412 56645329...

output:

5000
921922220 907940567 526496331 407453653 809314083 900902720 391465628 266825837 197510623 178204259 428276627 894383054 149541178 85654965 617062416 694491344 120801645 918478699 730185311 859573750 247121963 639402061 659183953 213565941 222898842 940237475 405568299 677562997 252027146 352505...

result:

ok good job!

Test #20:

score: 0
Accepted
time: 96ms
memory: 4108kb

input:

10000
522870486 728596067 342867687 773337741 995805742 913938215 693740993 719822271 646825737 560772154 902322257 186022837 683085684 810001222 351663644 301237456 965053493 776973140 453390057 342680011 159514296 171302654 909396470 78871368 576640309 310207930 237909277 559788088 536043927 77234...

output:

5000
274802113 721640048 590567185 663601729 29955799 221775361 493151209 59158244 219522501 12828176 328778131 717606763 800793013 612913217 272375765 301199434 337496124 274536840 912645929 442922099 350787659 255740307 295480436 700972743 685584839 586936655 186667536 777509516 30324215 491984949...

result:

ok good job!

Test #21:

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

input:

6
3 4 6 10 18 34

output:

2
3 998244351 

result:

ok good job!

Test #22:

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

input:

6
3 4 6 10 18 36

output:

4
3 998244351 3 998244349 

result:

ok good job!

Test #23:

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

input:

0


output:

0


result:

ok good job!

Test #24:

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

input:

5
0 0 0 0 1

output:

5
0 0 0 0 0 

result:

ok good job!

Test #25:

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

input:

10000
1 245891741 226139723 206942585 558823487 8541823 710143722 737817203 788048880 407329403 62158206 324888936 35083105 748226404 889980407 183664604 526765856 718429815 961319171 108116936 694246175 202488226 145295716 909864506 948124261 466352404 525407018 37242899 276848228 101063394 6087242...

output:

9999
245891741 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

result:

ok good job!

Test #26:

score: 0
Accepted
time: 69ms
memory: 3924kb

input:

10000
1 194213989 366758038 424683887 408723560 53914167 944759263 368899156 835231791 730509535 582265192 430376598 983581295 540232978 502272105 601856855 394483854 80439075 272780418 947999464 488384098 624245049 13638676 244840124 406429165 748869476 183677604 84415209 249369557 779050624 330532...

output:

6447
120999146 136987924 40280999 438515315 805152546 234164454 129099933 971852321 983937488 410134225 668461222 574343409 885417013 394300887 86086437 570981511 221329455 57893312 584381871 154204049 738660729 728257729 551666498 540440394 165573287 512342480 452470821 669622703 340240729 96538263...

result:

ok good job!

Test #27:

score: 0
Accepted
time: 69ms
memory: 3904kb

input:

9999
1 75531383 380877570 264321145 968784026 257619588 867907699 389578684 291407668 676804542 565934769 375121585 133851156 670443469 921445828 303481978 956684943 546950003 812475411 407455453 121862099 991481117 5347067 666922568 684615063 566012431 609569903 869268753 482331367 949587430 742602...

output:

6332
451794314 2028037 288974909 111681588 291303632 155763712 177741457 164199418 280452914 745629015 727272894 383855815 451963117 263419161 854025925 625817844 903511050 636159790 788165373 442332844 275132246 358996390 239303569 23523747 398318281 935986353 142493592 695297770 499848367 7061287 ...

result:

ok good job!

Test #28:

score: 0
Accepted
time: 96ms
memory: 4044kb

input:

10000
732430502 619323335 143673925 363625524 711920775 309179022 795345875 613657792 330775249 538340748 622828406 739667836 573797040 567495072 583027443 242020696 343498062 790777301 771487135 680102194 498584022 633723860 400289052 737528938 671835153 57827343 810201514 825994520 932990257 11135...

output:

5000
192279220 156648746 154396384 640494892 528756313 434883274 318065816 264440383 659789617 608119380 648104885 725454492 696703871 543030428 663661240 890791532 108201616 428505484 322953840 119811886 691103780 306647414 549862302 176916719 909058872 455464665 307270851 584469329 722629343 87531...

result:

ok good job!

Test #29:

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

input:

9999
687103241 347126321 214494609 687112451 267538383 344044515 571534619 704913056 988482222 996140562 671257712 70501805 230654805 733360228 552900298 641373406 515473855 246861956 619388040 73725244 588802848 508773713 779399661 259025850 521337863 307591742 368456118 738700688 79440145 46654551...

output:

4999
264704197 120999146 136987924 40280999 438515315 805152546 234164454 129099933 971852321 983937488 410134225 668461222 574343409 885417013 394300887 86086437 570981511 221329455 57893312 584381871 154204049 738660729 728257729 551666498 540440394 165573287 512342480 452470821 669622703 34024072...

result:

ok good job!

Test #30:

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

input:

10000
169266419 54934515 423962069 590724965 734297010 735412362 276486270 491768240 187904868 894436612 458949571 587954329 689009390 337916162 866559916 727947851 157691725 300488211 490705427 654886776 110388030 224087428 679993118 975364968 922835629 642502812 655568858 225728267 351315953 37335...

output:

1337
451794314 2028037 288974909 111681588 291303632 155763712 177741457 164199418 280452914 745629015 727272894 383855815 451963117 263419161 854025925 625817844 903511050 636159790 788165373 442332844 275132246 358996390 239303569 23523747 398318281 935986353 142493592 695297770 499848367 7061287 ...

result:

ok good job!

Test #31:

score: 0
Accepted
time: 42ms
memory: 3972kb

input:

9999
520051302 550859883 430358444 863626115 783047083 112272517 516754784 436625969 264360589 952350625 271591814 459964604 943367934 378666427 697071216 908961488 902929031 524389651 441606172 873581131 527204728 973891365 855771846 118722227 130919211 667558277 168741039 40620162 893071886 306225...

output:

2511
841612625 594492394 841259018 581533827 570061398 728741094 498398681 984147412 115961324 995955785 96920367 943961736 864913388 601212881 773189830 352297773 303107436 986036707 547042133 275735038 251015391 616994042 498027183 5049993 35681904 440260100 11762354 376808026 289984422 13742633 8...

result:

ok good job!

Test #32:

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

input:

10000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0


result:

ok good job!

Test #33:

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

input:

10000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

10000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok good job!

Extra Test:

score: 0
Extra Test Passed