QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#345079#2544. Flatland CurrencyzmWA 30ms13164kbC++142.5kb2024-03-06 03:24:422024-03-06 03:24:43

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3664kb

input:

5 57
9 14 31 18 27

output:

8

result:

ok answer is '8'

Test #2:

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

input:

4 50
11 11 11 11

output:

12

result:

ok answer is '12'

Test #3:

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

input:

100000 89648823509660
921733427 402270498 51157221 585477094 435728758 913951087 580580944 557082810 585086423 837912728 799129405 867009344 751591136 714946046 464999915 256043168 416678301 183246216 569365122 479031618 435168577 31068363 903791719 497652990 960987871 223120213 395437892 112869678 ...

output:

200414

result:

ok answer is '200414'

Test #4:

score: 0
Accepted
time: 22ms
memory: 11664kb

input:

99999 3234700062922
394766137 401419056 55997758 205712163 585962152 750591556 245421581 607883471 437707305 758188075 522354844 202404802 307099733 99935245 321784033 643800024 481548024 43007287 404431495 848761213 352455926 541535791 702868758 875691279 485597478 119612707 776231855 48839061 1144...

output:

61505

result:

ok answer is '61505'

Test #5:

score: 0
Accepted
time: 21ms
memory: 10664kb

input:

99998 86112926227914
869872247 684744959 824877228 56916375 758945367 128605666 283377693 33576989 443651099 153762116 163983342 366835792 816402292 863078123 487517337 884155303 155032070 26565182 354013355 820537114 239071699 443320558 470694592 531705267 151650392 734780493 229014960 750198362 64...

output:

200044

result:

ok answer is '200044'

Test #6:

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

input:

99997 68088898499161
684762234 212043311 111726077 799475781 502283626 527771716 232335052 250756028 374551362 101885838 831787899 187988661 488853660 347255010 936784303 526572911 618308527 763422946 682461738 114505538 466010668 976944572 410362920 865495559 378529442 962576489 11461567 119627044 ...

output:

200283

result:

ok answer is '200283'

Test #7:

score: 0
Accepted
time: 26ms
memory: 11548kb

input:

99996 31123987056923
811521298 923167157 268296554 713128986 529005433 6960604 560380182 915744363 677585658 283164493 623069887 93144993 785280453 273822868 519631154 173587478 894173238 309943194 185814329 887390123 613170876 277939354 675988088 550116615 485896461 227037085 722252712 239808335 32...

output:

187400

result:

ok answer is '187400'

Test #8:

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

input:

99995 91139805919556
450894725 525278995 449553688 598304327 433705782 895456537 123914232 273002894 616667006 697602183 149033912 491949510 15540278 42693327 52691855 294596279 130155839 148350866 694860784 228485201 18083366 140953026 690848775 96198613 412227936 593631893 221843918 735173984 7182...

output:

200713

result:

ok answer is '200713'

Test #9:

score: 0
Accepted
time: 22ms
memory: 11420kb

input:

99994 67034670830840
553137085 204710139 274056036 240585044 341821631 475856803 284003867 996450703 128779653 736218387 648508219 662402156 480212555 521751686 10550484 533354969 524242405 406277112 783479961 172994737 199250461 82614434 78653410 827438820 475150911 180706899 918964333 220980538 53...

output:

200496

result:

ok answer is '200496'

Test #10:

score: 0
Accepted
time: 17ms
memory: 10520kb

input:

99993 36781160415837
21578083 789828836 352590898 309342098 763543785 587415144 306693571 54214039 167763504 261699463 99817103 657836578 993145500 697275884 393294550 265277542 968071542 38198769 2701210 354554023 24369285 234491743 909684196 292006814 845478230 703274719 866473713 243970132 130064...

output:

197196

result:

ok answer is '197196'

Test #11:

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

input:

99992 42191781801868
646131581 9801523 748612444 889119663 683785721 678948237 768920069 118833474 745215515 272130908 344810642 895201366 434228570 635662952 127653217 382524680 986110783 833258657 931235236 568751733 645995951 724427051 854173860 829495299 66828956 847687264 298938163 58241456 146...

output:

200518

result:

ok answer is '200518'

Test #12:

score: 0
Accepted
time: 26ms
memory: 9868kb

input:

99991 25160109426611
944486913 391572327 68258312 76143226 203993453 938609554 473735421 501317936 167189998 236927051 638610803 412688425 765593330 976632225 77302695 866369842 333913678 941748 856949353 763693509 45979026 22106071 31461672 848002799 984292075 41140949 520755596 592587068 516812880...

output:

172360

result:

ok answer is '172360'

Test #13:

score: 0
Accepted
time: 26ms
memory: 11176kb

input:

100000 2661708139205
671058566 124672319 183392169 803800261 476253577 492641437 153800244 587660132 201506049 364528343 550963192 174930169 736386476 466746467 183504559 712271981 265455363 484100086 471130757 553825527 141503979 253998808 368050173 140606124 224727988 252991973 215757468 400699813...

output:

25017

result:

ok answer is '25017'

Test #14:

score: 0
Accepted
time: 23ms
memory: 10860kb

input:

100000 827521217316
40089276 22935121 27517762 20546643 12218188 27490082 8959159 10898508 17297167 5441024 7358869 8369649 34036971 34737391 20232933 8866509 12856783 9902794 16470293 13901658 7333309 11732498 37668186 24527362 9584909 7669644 20395948 28267171 40616096 13358083 20473127 17219747 9...

output:

125166

result:

ok answer is '125166'

Test #15:

score: 0
Accepted
time: 20ms
memory: 11072kb

input:

100000 27341744286289
242193848 493320977 251137178 493298896 356267737 160681949 214922483 197010188 626677871 280004292 461944157 361326847 493582897 298258493 653295821 198570548 254984972 315571582 354301561 377210402 424089861 584368766 100556569 429974037 428506626 172072423 104856149 41837094...

output:

225211

result:

ok answer is '225211'

Test #16:

score: 0
Accepted
time: 20ms
memory: 10536kb

input:

100000 302588405898
444978158 258233548 235353934 325817183 55922928 237654447 39147624 940238946 22318883 118298684 11244338 231765904 787610001 476872068 919013336 106565734 405854651 646211902 535002516 493683692 156206999 51160684 204078054 73529096 182887413 146755933 98981579 272170253 2208654...

output:

24990

result:

ok answer is '24990'

Test #17:

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

input:

100000 7738227752998
442107323 83591044 354015993 295402088 697395866 889533941 871802441 178784442 350420446 325712873 376959293 635164236 172646489 89530147 51744991 230449048 201217753 47832162 160841524 976873826 191221224 156746108 57174184 364179443 217400391 412494842 618792037 830525231 1054...

output:

125002

result:

ok answer is '125002'

Test #18:

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

input:

100000 25357310293416
310831787 102038583 166806202 653860612 246912264 561871817 507822786 113465911 276210282 119223647 249530229 129554184 54187483 55089809 695348431 113340889 13509596 81265333 304955877 263451516 993821136 167179939 181540399 666658892 297956407 385210348 245567609 287104957 12...

output:

225028

result:

ok answer is '225028'

Test #19:

score: 0
Accepted
time: 24ms
memory: 11900kb

input:

100000 1868303585177
162788559 219460833 132671959 107869654 140703299 668851946 136912029 119390819 363360853 108251799 173847769 549829172 650201471 316486543 333442163 119064789 303225057 335558302 338507568 157364169 180075014 259351948 329470883 171481254 657460941 166533569 141310674 253121368...

output:

19228

result:

ok answer is '19228'

Test #20:

score: 0
Accepted
time: 15ms
memory: 12660kb

input:

100000 12119266503924
126332884 426286267 136798334 163924424 447497657 148535204 124512864 191196279 194167199 180305589 781791161 589299726 325621282 367961598 128332029 189044059 183700834 251106708 333821212 376082138 110582624 197238114 369817528 577092032 186299694 149724124 391847712 38871092...

output:

95934

result:

ok answer is '95934'

Test #21:

score: 0
Accepted
time: 20ms
memory: 11444kb

input:

100000 10729854101733
320234391 138206852 49426234 126414053 81938809 51878074 48696199 69358354 60704899 54962204 46674924 48696139 65414089 191884037 248803826 297175551 159457773 84648599 80097994 59689049 59873724 61525449 43392129 74320204 150632518 64712119 237800986 55630969 278791076 7310679...

output:

172793

result:

ok answer is '172793'

Test #22:

score: 0
Accepted
time: 20ms
memory: 11932kb

input:

100000 231224450213
919064666 214121334 166182329 118160604 446926713 585695117 185895589 356818096 99425614 75589544 582134522 800047976 204551439 12613859 199071277 338611913 503432797 72339079 123962758 228113334 316575286 52675579 65083573 942952331 339053663 40053174 56284873 170010699 73246109...

output:

19190

result:

ok answer is '19190'

Test #23:

score: 0
Accepted
time: 28ms
memory: 11192kb

input:

100000 6002879042353
29695679 400285528 98460158 49182849 216411849 242061199 164531239 337449303 124001609 43495967 136137979 245012814 224136521 514320347 27619529 595933712 106771019 106883908 254683947 206840254 109933934 486194728 145406438 8102376 382095697 465154056 132709673 266901577 667645...

output:

95867

result:

ok answer is '95867'

Test #24:

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

input:

100000 19395212157267
218694917 159989624 948801081 74959128 158292473 7621574 773749691 4936168 563361027 464054043 104490614 97136859 236860524 209886728 179994489 602381527 556684211 394765168 30249924 4056444 243693109 176509364 224604389 107302814 243814339 154583269 46571779 361889548 34636119...

output:

172753

result:

ok answer is '172753'

Test #25:

score: 0
Accepted
time: 21ms
memory: 11168kb

input:

100000 3369414440752
648800129 543365091 676677334 828857801 844466271 546163641 852440301 901682528 793614186 798994924 544276499 771316722 796592927 816464121 848409153 904604548 847168244 685266367 856585294 688528732 711958822 510306147 719081587 901483287 770951781 930909497 504166131 502508181...

output:

25001

result:

ok answer is '25001'

Test #26:

score: 0
Accepted
time: 22ms
memory: 12300kb

input:

100000 19810958230342
582221833 643922059 527933074 477100457 547525327 664025133 750708746 489763704 531111162 631924259 666212017 789289202 656185179 584201447 635197564 709702976 568514314 737930126 734962319 520526894 556710854 715521036 507387481 439574516 702980703 440586249 623196698 52899088...

output:

124890

result:

ok answer is '124890'

Test #27:

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

input:

100000 23360893432175
217643234 374761649 324866297 243654504 380849091 248085983 348076783 210279508 386430657 301772728 391513147 210023948 381598349 247532511 250859871 376316377 311102574 329281218 368667756 386925582 400229001 353485447 236363022 214552801 273789604 256576317 358108609 39390420...

output:

225133

result:

ok answer is '225133'

Test #28:

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

input:

100000 422226718305
106603409 474509364 159111049 82590727 742183721 58217028 349372032 635301684 64692096 573472012 384337717 45989027 451208361 92475309 293145946 379152921 15014941 181465933 477884263 195565506 455870227 593262264 54197163 591930378 51749186 942241837 448133076 878495038 11296369...

output:

24995

result:

ok answer is '24995'

Test #29:

score: 0
Accepted
time: 21ms
memory: 11308kb

input:

100000 10438562725606
505816658 543996541 481842753 346037029 172556063 749336916 203352279 207298694 107156783 112984194 396629443 218527896 520423268 749445742 620437429 941185621 526020971 909857243 66980601 72838537 630177837 163627468 70598651 313723774 268078838 24051338 412703167 546959854 27...

output:

124924

result:

ok answer is '124924'

Test #30:

score: 0
Accepted
time: 23ms
memory: 11156kb

input:

100000 34998200719402
571049959 943421856 723932388 513042447 863852016 14860306 845998108 30413764 106218719 804285564 392441258 42687731 545987787 965885001 8857427 446204031 960081997 163408637 332440763 956588286 646716521 240716442 919648732 802447091 853396551 899313961 392109803 915509539 594...

output:

225320

result:

ok answer is '225320'

Test #31:

score: 0
Accepted
time: 17ms
memory: 11632kb

input:

100000 264832552872
48375889 54436299 52108064 71273656 63572624 61808704 87224199 78831322 84518381 49549174 67233529 65530459 62560862 67315474 64603504 57862681 92134739 75700869 50697598 89784957 67662688 69110728 54900649 90300794 74369904 52604569 86383059 84665539 92176884 56947174 68318509 6...

output:

19180

result:

ok answer is '19180'

Test #32:

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

input:

100000 13627653118741
437530948 572694107 443584363 462332949 410775704 374414089 443954109 483250247 395703953 549766907 502403087 385098134 553031332 346284784 415287514 569997022 524704044 524315194 475004181 335448414 649891662 611227114 632079326 555535447 506482472 641487834 659177144 38861248...

output:

96055

result:

ok answer is '96055'

Test #33:

score: 0
Accepted
time: 23ms
memory: 11692kb

input:

100000 31566884066714
308010698 378291098 427064432 329480121 478026034 431640019 443376576 363000901 360710804 300279659 470553139 509893022 345537559 539186367 527917894 440579514 292558264 291395319 383943979 479965218 434387714 308886638 281568596 318482884 478343959 426657496 282084419 29351065...

output:

172201

result:

ok answer is '172201'

Test #34:

score: 0
Accepted
time: 28ms
memory: 11916kb

input:

100000 378787615198
73071194 769959187 132375553 695409313 208432169 762804677 524448944 131174028 581228036 425606348 511483489 665669197 652269284 391063009 599928306 339919064 403333874 257958104 910976769 810114908 420995254 804487787 294738128 253312918 313717227 500049604 360987413 596498419 9...

output:

19199

result:

ok answer is '19199'

Test #35:

score: 0
Accepted
time: 28ms
memory: 11496kb

input:

100000 9557979221628
107318851 567239273 122575501 515253189 73227434 927629553 772082143 239024424 122460179 595249784 406671609 154092472 812239313 696403057 976066484 947128759 377053909 515854536 709555279 331945259 676455948 910322963 603071938 466707044 358851104 640096784 51377824 294872787 9...

output:

96082

result:

ok answer is '96082'

Test #36:

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

input:

100000 34732776389051
657077443 416078242 273907962 366760179 517554711 382315797 439952313 535787229 80294649 635831904 978392436 216144692 827381254 216744322 365823719 678365958 625727887 815938169 853010624 677281156 349614149 959674339 180062042 358076979 62703444 588338323 624586084 347566019 ...

output:

173236

result:

ok answer is '173236'

Test #37:

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

input:

100000 1667710404674
290791032 241887467 233326542 110467399 172266613 424388561 191020173 168469028 202865428 98802209 213550617 402002141 116388014 153184808 371653687 142746203 341966272 455372786 120957704 235752043 493147306 236963488 195987323 294535086 428940976 256618692 494322861 160194928 ...

output:

25041

result:

ok answer is '25041'

Test #38:

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

input:

100000 18728004391261
613996532 621766732 275607978 549226297 199282359 602497471 656015007 208468894 322708348 677906507 769915846 435916432 854463306 139910404 391388743 305623353 365204542 662400772 713993502 594219061 364113148 641321281 154511689 741671381 151076229 466742582 225627939 46897357...

output:

124987

result:

ok answer is '124987'

Test #39:

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

input:

100000 1456254928599
24414647 12392583 17647642 5453024 24975696 22079072 7811804 13001758 19041761 4538484 5294994 35324421 12197803 35241221 15788982 14968358 5412464 4681174 11763068 19591456 4739799 6226744 6782564 5346609 7654614 23081487 18133762 10852653 15059273 9273238 17857463 11794293 162...

output:

224735

result:

ok answer is '224735'

Test #40:

score: 0
Accepted
time: 22ms
memory: 12220kb

input:

100000 345870159034
43837457 385310206 484489973 148913614 688057651 769869126 534302286 214191289 688405236 606218232 343407253 154617969 497370031 168218807 879908326 332450453 507996402 389265191 220112554 153320252 35843644 856694481 363874778 540806932 805121306 141913192 432267678 455417307 25...

output:

25013

result:

ok answer is '25013'

Test #41:

score: 0
Accepted
time: 24ms
memory: 10496kb

input:

100000 7780658162958
322333117 27990998 481561133 216116509 116326424 915786356 490373416 457284787 244246416 321106633 774223701 912866281 168022971 155800079 223044258 282161322 348299022 65544179 25601434 674617892 202372806 305562946 228811713 521223501 525725371 41707629 155439969 95400254 3588...

output:

125018

result:

ok answer is '125018'

Test #42:

score: 0
Accepted
time: 22ms
memory: 11000kb

input:

100000 25772504140193
341798413 170015727 438767872 290879923 752982376 130267059 70110194 203323523 90089349 280994852 244651509 170015822 314377233 487207767 155206104 102684889 132253329 16400264 138771063 36770614 30163169 635053677 232469478 943673141 19852544 176052474 362138488 93401234 62510...

output:

225039

result:

ok answer is '225039'

Test #43:

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

input:

100000 1262780146677
107749634 202197633 289869411 232688722 114600954 95231684 85062184 342791736 127097033 317007702 425351321 115484184 253520167 91693769 189170318 106521209 85790569 116816719 442929571 224349543 65171864 202002427 220016163 263631622 62898214 188953558 215785657 111972319 79249...

output:

19202

result:

ok answer is '19202'

Test #44:

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

input:

100000 2305519025143
22541894 25755914 41743398 23593209 20925934 76641568 20398929 22631949 25974154 69727073 42347143 35678829 37160549 140943371 101745746 54269443 88996572 115042281 31365474 101912812 36534439 33534689 50785853 34923449 67119438 55385818 21219459 30285894 56978873 85253087 25910...

output:

96075

result:

ok answer is '96075'

Test #45:

score: 0
Accepted
time: 28ms
memory: 12748kb

input:

100000 30440169714871
213259539 672251312 367533293 148917599 716065072 425616557 450352088 202221114 167345819 165469324 722154912 183942299 428254312 948314501 179727929 696924132 225424929 233219089 166976744 267491248 353682058 368197378 208662144 541687592 195869304 501223802 167304084 22251923...

output:

172774

result:

ok answer is '172774'

Test #46:

score: 0
Accepted
time: 27ms
memory: 11656kb

input:

100000 237758909908
74007963 50960724 82473709 278224997 200123444 59317453 864895731 34567819 14348733 42465559 194675799 329573311 188550599 73538084 651523207 92741819 201845134 458445073 26855954 214937058 401857373 190059034 254936448 358153288 313813657 42672429 349839312 11609689 28799707 629...

output:

19204

result:

ok answer is '19204'

Test #47:

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

input:

100000 5734184735634
81917864 410036257 86227894 239478491 485202387 126905124 144623169 187215459 452497501 564562587 47461598 335100608 133751864 434491423 144620208 335626083 22921104 195860266 55182974 61244739 25199509 152469944 187088844 66581577 74301947 105675272 205156329 149007143 72166904...

output:

95780

result:

ok answer is '95780'

Test #48:

score: 0
Accepted
time: 20ms
memory: 12600kb

input:

100000 19271671265454
234566604 17447144 112284677 705461012 187373509 96536202 617121982 230646519 175253963 20927359 496928541 2140594 729614122 6660029 64321392 162358694 160622202 657044627 217432704 304764533 167310164 445199953 109744997 112819304 406459002 230646584 184423788 106759054 181986...

output:

172411

result:

ok answer is '172411'

Test #49:

score: 0
Accepted
time: 22ms
memory: 11856kb

input:

100000 831011147474
143344807 151821508 144569203 118744837 208785161 187867674 143804446 132435487 136120413 153344472 224401187 199763848 215703887 227988252 210132076 209278448 215968859 227862404 146601386 188888348 141050786 203176701 174309951 203851838 182089437 131913192 140043378 155193779 ...

output:

25000

result:

ok answer is '25000'

Test #50:

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

input:

100000 12565070001078
394330964 400051118 431825568 473486814 383097423 472139112 445296392 485199796 287761311 482551071 280490848 410703689 465589759 437813589 451608011 467918803 304452372 464589277 515028876 530913414 292561101 381110483 522277839 394772331 282291116 312789082 375048921 50739225...

output:

125015

result:

ok answer is '125015'

Test #51:

score: 0
Accepted
time: 26ms
memory: 12168kb

input:

100000 56164840431703
606704504 921086158 748145629 934057987 880590048 615704227 658661416 766454633 621764891 834419892 855745756 804839388 588529438 809706607 673384447 597969419 849351533 970332891 512049546 954433052 556120393 827862477 541607374 509275454 562533729 762098444 803650328 93552441...

output:

224964

result:

ok answer is '224964'

Test #52:

score: 0
Accepted
time: 23ms
memory: 11604kb

input:

100000 442897939721
834760588 116682523 601742341 592383612 974901591 323033577 960249782 463706073 441727318 909393172 293492261 578233579 754442489 577058072 526585249 821883028 952924274 762065228 541005023 333645448 384964683 44221917 579299711 587638972 145930157 215603394 235824066 837915468 1...

output:

25018

result:

ok answer is '25018'

Test #53:

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

input:

100000 10229124976224
873917384 1314793 677998276 812819517 426522871 894953522 889837028 771323006 838803077 850671303 179688184 680554989 331456352 878362617 416731206 124920299 761388934 666028992 991314391 257779436 386808138 390253024 764442463 867314874 328673038 347305136 152271436 829829719 ...

output:

125126

result:

ok answer is '125126'

Test #54:

score: 0
Accepted
time: 20ms
memory: 12448kb

input:

100000 34946710064430
339639189 954983589 463172659 431943944 355711951 240934188 386550741 553140697 902552662 642116041 290403979 343373326 93441091 817824507 813677148 219243692 93588938 559225597 12276162 89205243 81511709 116704396 767232457 445249353 498628256 521398958 544579911 441554062 972...

output:

224977

result:

ok answer is '224977'

Test #55:

score: -100
Wrong Answer
time: 25ms
memory: 11812kb

input:

100000 2569899789128
554998356 534299444 864299069 854317787 490480926 526275909 591566419 764969589 637505834 563269324 889966554 845074519 757400354 613024549 759585121 820334044 646318244 656012311 755315854 680424559 498995294 632425844 881107029 797937968 494247214 870944128 535871079 465734314...

output:

19186

result:

wrong answer expected '19187', found '19186'