QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#77369 | #5369. 时间旅行 | Qiuly | 43 | 2640ms | 3700kb | C++14 | 3.5kb | 2023-02-14 14:59:24 | 2023-02-14 14:59:26 |
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
Subtask #1:
score: 3
Accepted
Test #1:
score: 3
Accepted
time: 2ms
memory: 3628kb
input:
13 1 1 13 1 2 1 9 1 11 1 8 1 5 1 6 1 4 1 10 1 7 1 12 1 1 1 3
output:
6
result:
ok single line: '6'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
101 1 1 71 1 95 1 1 1 4 1 85 1 11 1 94 1 29 1 99 1 41 1 59 1 51 1 79 1 67 1 13 1 84 1 16 1 43 1 55 1 18 1 92 1 10 1 77 1 86 1 49 1 20 1 8 1 32 1 72 1 40 1 52 1 76 1 39 1 61 1 82 1 66 1 44 1 3 1 35 1 37 1 48 1 15 1 96 1 33 1 83 1 2 1 30 1 75 1 54 1 70 1 22 1 63 1 60 1 88 1 97 1 34 1 9 1 17 1 57 1 80 ...
output:
50
result:
ok single line: '50'
Test #3:
score: 0
Accepted
time: 26ms
memory: 3700kb
input:
291 1 1 1 1 243 1 31 1 188 1 77 1 101 1 20 1 177 1 58 1 12 1 201 1 152 1 89 1 205 1 203 1 214 1 225 1 94 1 147 1 100 1 235 1 103 1 196 1 216 1 192 1 143 1 6 1 259 1 215 1 51 1 234 1 2 1 102 1 17 1 157 1 82 1 52 1 211 1 176 1 264 1 149 1 74 1 105 1 202 1 172 1 226 1 165 1 271 1 78 1 285 1 262 1 88 1 ...
output:
145
result:
ok single line: '145'
Subtask #2:
score: 8
Accepted
Test #4:
score: 8
Accepted
time: 2ms
memory: 3508kb
input:
14 2 2 844974872 196961856 2 282529753 793092789 1 450615292 2 894675938 183278191 2 134804124 988858141 1 440476238 2 892091463 453193625 2 918614039 267044448 1 91126449 2 699070127 177282394 2 365458732 596469725 2 789994620 379428523 2 758349986 369167103 2 227448762 297426831
output:
392388416
result:
ok single line: '392388416'
Test #5:
score: 0
Accepted
time: 2ms
memory: 3488kb
input:
15 3 2 638683108 412097665 2 83585363 50407490 2 843046135 358173578 1 663325200 2 608604244 118346780 2 802365081 329993762 2 507345539 849824533 2 130234046 104894823 2 203433503 491790497 2 257479357 356611715 2 393337689 968844221 2 637493087 938737497 2 165665517 338554501 2 32482910 142430578 ...
output:
461498682
result:
ok single line: '461498682'
Test #6:
score: 0
Accepted
time: 2ms
memory: 3448kb
input:
15 7 2 4067 4163 2 3780 4073 2 4060 4132 2 4115 4095 2 3801 4137 2 3767 4097 1 3976 1 4074 2 4141 4153 2 3965 4092 2 4080 3902 2 3863 4136 2 4153 4057 2 4045 3789 2 4117 4093
output:
198
result:
ok single line: '198'
Test #7:
score: 0
Accepted
time: 2ms
memory: 3588kb
input:
15 1 1 873331282220671423 2 735219904810912770 161751845932907141 2 25004270082210777 318839217154000771 2 674996277812508140 449008857311902192 2 472769470430097478 397080345283004274 2 47924412360460752 498222902664554012 2 564253525446680521 853694259885512872 2 656010667051096953 815344423905298...
output:
458440019518723706
result:
ok single line: '458440019518723706'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3604kb
input:
15 13 2 896348312198404671 869762298 2 131322200859472553 156263978028639571 2 519956577 38 1 160595875 2 945987587 50986789140245249 2 41 241229344708873674 2 608655655392127091 41 1 40 2 806584170 50835315064131334 2 3623574246181054 976074155891825784 2 58183525 937860538 2 998266378 826367056 2 ...
output:
430005287589733910
result:
ok single line: '430005287589733910'
Subtask #3:
score: 5
Accepted
Dependency #1:
100%
Accepted
Test #9:
score: 5
Accepted
time: 209ms
memory: 3580kb
input:
287 1 1 173840701363378004 1 743361258032855446 1 746614854489854642 1 56541606566914354 1 420238720727662982 1 851742472173310082 1 663095483358412253 1 909940213272622771 1 793226013158281220 1 545752184531876147 1 428168322861170312 1 445062401949703086 1 781910693870313013 1 656624250154096657 1...
output:
449906768878285431
result:
ok single line: '449906768878285431'
Test #10:
score: 0
Accepted
time: 913ms
memory: 3624kb
input:
291 1 1 200467876183364735 1 226128802768594222 1 30992945592387546 1 131773707522781490 1 237517614711585543 1 767178437925265104 1 476367111669121061 1 569219147773036356 1 307153686500641679 1 256093763487190540 1 489553827811869668 1 665158752209826021 1 821778345278263808 1 591434397265270731 1...
output:
413750515661326196
result:
ok single line: '413750515661326196'
Test #11:
score: 0
Accepted
time: 39ms
memory: 3696kb
input:
299 1 1 196564096074155356 1 215761209458809063 1 229199188828066663 1 207442460325459123 1 147931408833032623 1 165208810879220961 1 156890061745871023 1 281031394966631680 1 190804962058759240 1 165848714658709418 1 274632357171747109 1 178006886468990102 1 183126116704897759 1 263753992920443339 ...
output:
95345663143780088
result:
ok single line: '95345663143780088'
Test #12:
score: 0
Accepted
time: 48ms
memory: 3640kb
input:
291 1 1 33421439583378802 1 58525406002796904 1 59037731848091151 1 71845877980447328 1 54939125085737173 1 56305327339855169 1 59720832975150147 1 42814080080439994 1 38886248599850767 1 34446091273967295 1 80213866786920026 1 80384642068684774 1 58866956566326401 1 74919833052212806 1 674057206545...
output:
24762415855888600
result:
ok single line: '24762415855888600'
Test #13:
score: 0
Accepted
time: 54ms
memory: 3584kb
input:
299 1 1 65691845888395612 1 216175196973785149 1 60434785588469342 1 137319292474891070 1 61749050663450912 1 160976063824559296 1 86720087088100703 1 218803727123748287 1 169518786811939488 1 153747605912160670 1 165575991586994780 1 141919220237326556 1 35463749163819549 1 188575630399172220 1 145...
output:
97912748086126811
result:
ok single line: '97912748086126811'
Subtask #4:
score: 12
Accepted
Dependency #3:
100%
Accepted
Test #14:
score: 12
Accepted
time: 1091ms
memory: 3548kb
input:
298 12 1 645886088791049540 1 426745180837601651 1 979147412433797722 1 922061238106952073 1 274440630526214995 1 424124977235014990 1 204894438049963221 1 764943184717907334 1 779533900124364741 1 454823872376348471 1 487382439634807111 1 591648739045233572 1 53460960257864384 1 392937311085787220 ...
output:
446040287477110394
result:
ok single line: '446040287477110394'
Test #15:
score: 0
Accepted
time: 1543ms
memory: 3584kb
input:
285 3 1 915828826922386175 1 908205342117914832 1 873896977912303819 1 656558831677725931 1 576889220915038574 1 104013515132123991 1 706177613718527725 1 198684931909293626 1 494902099840825229 1 89161767331355640 1 178478456398904787 1 115932633756444471 1 138418817497444484 1 414147023206092509 1...
output:
402109191950085563
result:
ok single line: '402109191950085563'
Test #16:
score: 0
Accepted
time: 2640ms
memory: 3580kb
input:
290 8 1 87958755742337433 1 257381168536262370 1 937989408112804408 1 194798272982765279 1 498991322819486370 1 977524249586089037 1 912136601439828528 1 500742285087273119 1 33135176968228980 1 940337323147451787 1 646963258773910853 1 826406775797523718 1 235531045573726392 1 952251530552011077 1 ...
output:
381364661745038978
result:
ok single line: '381364661745038978'
Test #17:
score: 0
Accepted
time: 41ms
memory: 3516kb
input:
286 2 1 275543708198154703 1 249566763748953083 1 144254826792730280 1 189187919894052009 1 270629151140197641 1 194102476952009076 1 246056365850412323 1 263608355343116123 1 262906275763407971 1 250268843328661233 1 160402657126017777 1 210250307285296570 1 225696058038875911 1 150573543010103650 ...
output:
99695300318557576
result:
ok single line: '99695300318557576'
Test #18:
score: 0
Accepted
time: 37ms
memory: 3496kb
input:
300 12 1 164380439043062353 1 124158335088338941 1 96965926780920306 1 64108433409456117 1 119626267037102508 1 57876839839006013 1 197804440920931095 1 166646473068680572 1 178543151703176224 1 100931486325752192 1 52211754774960459 1 177410134690367115 1 114527690479461513 1 204036034491381198 1 2...
output:
81577224922255913
result:
ok single line: '81577224922255913'
Test #19:
score: 0
Accepted
time: 32ms
memory: 3644kb
input:
298 28 1 16543256762872223 1 121361510921749171 1 207046274242100976 1 214533292396306476 1 34012965789351713 1 199559256087895478 1 139663110854251503 1 90581547398904360 1 157964710786753830 1 52314565721854039 1 183753328873461653 1 219524637832443472 1 120529620015726343 1 105555583707315354 1 1...
output:
112305272313082450
result:
ok single line: '112305272313082450'
Test #20:
score: 0
Accepted
time: 36ms
memory: 3516kb
input:
297 15 1 85560496741181875 1 17311353112525522 1 60060816704101475 1 10561437808592475 1 43936019033594759 1 18061343701851415 1 56685859052134946 1 31561174309717505 1 66060741418708627 1 56685859052134940 1 96060364991744387 1 39061080202976448 1 47310976685561281 1 92310412045114920 1 14311390755...
output:
52874336547475521
result:
ok single line: '52874336547475521'
Test #21:
score: 0
Accepted
time: 26ms
memory: 3568kb
input:
285 103 1 28285744248308508 1 23382557245297071 1 31472815800266028 1 36621162153427957 1 20195485693339633 1 41769508506589971 1 31472815800265949 1 31472815800265982 1 48388810960655417 1 31472815800266030 1 31472815800266002 1 31472815800265910 1 49124289011107128 1 31472815800265915 1 3147281580...
output:
22309500863702045
result:
ok single line: '22309500863702045'
Subtask #5:
score: 15
Accepted
Dependency #2:
100%
Accepted
Test #22:
score: 15
Accepted
time: 8ms
memory: 3580kb
input:
97 3 2 355271459380040532 547563913925852132 2 501938321780836726 747940481178452472 2 397422061492707294 74967044201975790 2 377923940791121468 378164526846394284 2 264704309452054653 529171612856996754 2 316250711337645385 284323194941392101 2 358629778571158126 368864454575116270 2 38360271038026...
output:
372997432997019308
result:
ok single line: '372997432997019308'
Test #23:
score: 0
Accepted
time: 7ms
memory: 3520kb
input:
95 3 2 594630321920106655 540002493103501660 2 125138319916363529 212072562657897457 2 373817802718383543 13665937791620288 2 315045821144016344 338252361890399510 2 483343425646600556 466582885679461518 2 278197329086017453 428516032353992829 1 59661599996472250 1 254583199582888328 2 4365367002001...
output:
340047122337218325
result:
ok single line: '340047122337218325'
Test #24:
score: 0
Accepted
time: 7ms
memory: 3520kb
input:
97 7 1 24243537937597964 2 582465432759982368 381373957332513395 2 391506769288663264 391876487817869396 2 299551892852869811 107731633859975720 2 156125257586893617 386175789126201813 2 213724291907872015 7697465108273724 2 393633870223728807 256416638715125266 2 290510273528299134 2903854981034601...
output:
333882379519018440
result:
ok single line: '333882379519018440'
Test #25:
score: 0
Accepted
time: 6ms
memory: 3448kb
input:
95 23 1 344791905917209572 2 500083441805144564 509549936981982064 2 329347121414961283 362188436612461360 2 104614943880747675 52960311801613673 2 617606793494520742 33376598049670497 2 342392895594188447 343263248105091839 2 322740972473445196 399001118836944088 2 263495523699786974 33004821266770...
output:
342055752596049500
result:
ok single line: '342055752596049500'
Test #26:
score: 0
Accepted
time: 5ms
memory: 3632kb
input:
99 55 2 89904938987641376 194722167738160343 2 365265714020104046 364275631130776282 2 357172107220911532 357175936070256675 2 366602422140587285 355364788434700731 2 361062739069662108 366182699259043884 2 337340987023855575 362758639984591817 2 356267270889109816 368009872611506605 2 3024813222427...
output:
364338868647435728
result:
ok single line: '364338868647435728'
Test #27:
score: 0
Accepted
time: 234ms
memory: 3540kb
input:
97 1 2 91117126161960832 152612010977891961 2 92648119158704985 151081017996819264 2 89586133179453808 154143003954271449 2 158480817402063313 85248319729017232 2 98516925587766625 145212211563875680 2 143681218561699334 100047918559918464 2 91372291675484725 152356845482241792 2 42496577125387271 1...
output:
48991775437581466
result:
ok single line: '48991775437581466'
Test #28:
score: 0
Accepted
time: 485ms
memory: 3532kb
input:
99 7 2 98167144235383792 162846238547509242 2 110279334179192048 150734048597100487 2 100105094626393120 160908288150903547 1 103496507811808992 2 113670747363458352 147342635414727615 2 155578924576512119 105434458201668736 2 114881966366627512 146131416432864448 2 143224490830472185 11778889194435...
output:
49417734962138572
result:
ok single line: '49417734962138572'
Test #29:
score: 0
Accepted
time: 276ms
memory: 3580kb
input:
97 9 2 54431100011379795 123163200193479616 2 76135973755564686 101458326453569856 2 114963581215047218 62630718965509088 2 113998920169962160 63595380028205758 2 66489363185937488 111104937001685664 2 112551928586934876 65042371606848045 2 119786886500604768 57807413693802295 2 117134068599060240 6...
output:
48715383286150883
result:
ok single line: '48715383286150883'
Test #30:
score: 0
Accepted
time: 222ms
memory: 3508kb
input:
99 25 2 106010712580746813 121015703886102576 2 100887057019501060 126139359431213171 2 120771720272231650 106254696174568800 2 123333548053805727 103692868393393504 2 99789130823331506 127237285640385408 2 100277098028296147 126749318429244132 2 47759708926726656 131506998592303065 2 12418749064706...
output:
27082179393946704
result:
ok single line: '27082179393946704'
Test #31:
score: 0
Accepted
time: 78ms
memory: 3512kb
input:
97 45 2 60136866605811552 124345544107147019 2 76594686469603390 107887724253254560 2 69408877811642167 115073532918614193 2 112291929565404383 72190481171528075 2 75203884789228032 109278525930449428 2 113914531507888702 70567879194386446 2 77753687885725021 106728722854530224 2 62918469962749976 1...
output:
55168466576040844
result:
ok single line: '55168466576040844'
Test #32:
score: 0
Accepted
time: 5ms
memory: 3520kb
input:
99 5 2 198135106606661855 113916402567297699 2 48120191860754846 293410793355960751 2 94941794543868424 20417673785789215 1 226217845720159620 2 73684573953683624 17570909162001220 2 101022587365517836 196966396107737257 2 92243699696770229 40192370826192154 2 231607253778443314 80159020488470828 2 ...
output:
168539672203603029
result:
ok single line: '168539672203603029'
Test #33:
score: 0
Accepted
time: 3ms
memory: 3516kb
input:
95 3 2 50213096412115275 103975930702601995 2 97337964450805816 52911609072878411 2 117019404580474190 114025828858917779 2 68255057774800636 33171864123352472 2 170782259210777541 8977948292011175 2 117937890322882815 124616648634050928 2 155488867905104901 231131932024847380 2 33763780676475410 13...
output:
167986301522260786
result:
ok single line: '167986301522260786'
Test #34:
score: 0
Accepted
time: 4ms
memory: 3448kb
input:
97 9 2 183888672937660637 30553903041146403 2 26197600647874261 87569599505429025 2 79122891657061301 43560019083754841 2 174537878354732366 25842168242849089 2 256946649950496002 45156982881291173 2 177513401227386667 60176368310826634 2 259839002603971882 83808389793977724 2 127533091953826330 190...
output:
188080092526197682
result:
ok single line: '188080092526197682'
Test #35:
score: 0
Accepted
time: 4ms
memory: 3556kb
input:
97 11 2 179169235362173901 197851068898330160 2 110092684659314938 38263031223051509 2 271561202603146920 193668015553789322 2 137293773808224547 96546099567205926 2 106034584983483180 120406372225155512 1 209157017448366887 2 198420117636462395 56078492848670786 2 32278873506739235 8910442247556405...
output:
176745142904935557
result:
ok single line: '176745142904935557'
Test #36:
score: 0
Accepted
time: 5ms
memory: 3584kb
input:
97 83 2 3058210112348103 251656328569775857 2 159979467084234473 14653211943110880 2 76647717823732513 16261613594275528 2 38738564467155027 180450713596174741 2 49378591649363047 81990160674878691 2 70059707062311627 43810417369623980 2 146798765491272833 66669774091202626 2 59887191859459332 21054...
output:
164989133334695959
result:
ok single line: '164989133334695959'
Test #37:
score: 0
Accepted
time: 4ms
memory: 3548kb
input:
95 3 1 79746836969422427 1 42391428648545948 1 88875953530675857 2 88841916692095381 137627653936820508 2 712052024007309148 333423189903908250 2 986954048764504050 128101575472945186 2 230622076265569785 572057638300385894 2 528803236876069800 659146479704153761 2 7538214892502187 1171687065730782 ...
output:
493465914306706541
result:
ok single line: '493465914306706541'
Test #38:
score: 0
Accepted
time: 3ms
memory: 3632kb
input:
99 7 2 655813374949405866 823577592729353044 1 640042878929844449 2 695642933493784371 945344536691197960 2 541964275561186574 7430765146141955 2 39312995416278820 627166137018189317 2 629262138849170590 286213175761499517 2 348709480000878755 401714233242657861 2 654694573696082390 3124050086905211...
output:
499287770269278734
result:
ok single line: '499287770269278734'
Test #39:
score: 0
Accepted
time: 5ms
memory: 3512kb
input:
97 9 2 475518932525346244 343403718312668543 2 879231240161276859 10450928184363035 1 105804198533526150 2 610676660756860171 204196709613629013 2 422878093774396458 61610978468941477 2 482420390241772890 733073164585000299 2 244803056545563584 8188923919910582 2 900521888056791479 45475387423808153...
output:
492740313054335165
result:
ok single line: '492740313054335165'
Test #40:
score: 0
Accepted
time: 6ms
memory: 3520kb
input:
99 21 2 647804602481517176 415705130952528606 2 337297773077441698 459345775513725917 1 651747956168927564 1 346840608178513093 2 43032416133085083 971214472621300347 2 509801562927695174 60076272302632014 2 938067487641306760 579154632324366305 2 137031321641654131 353732664563203692 2 121904481290...
output:
490601692536600317
result:
ok single line: '490601692536600317'
Test #41:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
99 35 2 91182147626737794 95766028528018665 2 15832534471368700 78849240629511181 2 72744761231271027 588978061306441444 2 249424250283220487 518174250150106785 2 696855615852331379 665858146558163461 2 72245644754216308 856062009968434543 2 26104920612852352 621858855883079202 2 32258629809556553 9...
output:
495063067687704945
result:
ok single line: '495063067687704945'
Subtask #6:
score: 0
Time Limit Exceeded
Dependency #5:
100%
Accepted
Test #42:
score: 24
Accepted
time: 42ms
memory: 3572kb
input:
197 3 4 254449407090124613 112140590900425972 309238953726281947 391489935037483281 3 81718890371981946 311720329125105766 510862207453246006 4 432686156999435021 349733674175878549 398194808015575569 566023817519883042 4 181267378904922445 380086723415223853 539271538418079357 59944569356014918 4 6...
output:
348401785162894785
result:
ok single line: '348401785162894785'
Test #43:
score: 0
Accepted
time: 44ms
memory: 3620kb
input:
195 3 4 635658816149515072 414784031822529380 235575829086519156 722024027837159722 4 685532441247379256 422173233659879849 196867289647634556 318992902069434291 4 329332282130228074 274053270170222304 579395260339205782 296441225948542074 4 749921202609862512 680831611407491744 190087527660350902 2...
output:
407796848009069436
result:
ok single line: '407796848009069436'
Test #44:
score: 0
Accepted
time: 35ms
memory: 3556kb
input:
195 9 4 470228449192346220 386508039486696031 421329369340339430 411690053206516239 4 711063085634537182 817498317354768547 686412818064878023 279101510288191687 4 263327768153388487 121862888534106607 619177823276544139 454235321494824970 4 441896159625445657 429507402614835116 354807719574031013 4...
output:
428029571932857784
result:
ok single line: '428029571932857784'
Test #45:
score: 0
Accepted
time: 34ms
memory: 3560kb
input:
197 21 4 365159629819060661 391632520517667346 396780443151824676 446153437812790722 4 408380654739889093 545518153622191116 505375948153736732 488032836798937441 4 172134525442701654 426624656444075608 427932857208579686 667591650754120366 4 281008795447393282 621679351030195089 521755858043719192 ...
output:
419094132948443444
result:
ok single line: '419094132948443444'
Test #46:
score: 0
Accepted
time: 34ms
memory: 3492kb
input:
199 55 4 14779418048476436 87621886119921428 246067195034920528 552824057876417836 3 338180081618674723 337615749075511470 334520468218137005 4 432408261794346346 66605512917765975 533321258660178959 519972524105851946 4 405496523021625552 52003223821151316 239486105393539243 139215119565631212 4 33...
output:
334282905626124092
result:
ok single line: '334282905626124092'
Test #47:
score: -24
Time Limit Exceeded
input:
195 1 4 113068927731146016 78075004957272898 72406973977896446 88810539240393028 4 92166874434460992 72639993775471660 103228510650728079 112835907938941536 4 111088259497407888 104651775075684131 84056589440816868 74387642223208366 4 117962343367440224 67513558352823171 89437590103891815 7833031478...
output:
result:
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
0%