QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#699117#8831. Chemistry Classucup-team4464#WA 351ms65116kbC++204.0kb2024-11-02 01:28:102024-11-02 01:28:11

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
1 2 1
42 69
2 3 1
1 2 3 4
2 5 1
6 1 3 4
5 19 1
1 7 8 9 10 11 12 13 14 20

output:

-1
2
1
4

result:

ok 4 number(s): "-1 2 1 4"

Test #2:

score: 0
Accepted
time: 277ms
memory: 65116kb

input:

1
199996 67013419502794 1
403716252634677166 895717933735068492 410002430455111886 844431179242134559 322988383133810700 133475121268220299 481706326769800263 606871141911985391 195911124687409946 959578180866483093 930547702157856949 877914383714875160 994158366044742636 890855755285236186 69498488...

output:

0

result:

ok 1 number(s): "0"

Test #3:

score: 0
Accepted
time: 284ms
memory: 64924kb

input:

1
199998 38987266278826 1
974183459404323858 517476981059568123 730207399881008603 532509909948600146 89227878552241675 16653300445469756 791674368913652595 92177901403222015 980536748304824579 581564387828767376 471919726893404451 759601909683722004 632340812998214017 818440789777778368 18845836031...

output:

0

result:

ok 1 number(s): "0"

Test #4:

score: 0
Accepted
time: 274ms
memory: 65044kb

input:

1
199996 54170919220045 1
968843690955781467 596307347951820347 406785475849275444 383666938223357986 725160735782817082 132577412512120631 891899794864087098 779434145671998619 932681297277907326 208765550447928461 385078857912267975 669360937040314510 917331948890514855 505938744714587815 47145437...

output:

0

result:

ok 1 number(s): "0"

Test #5:

score: 0
Accepted
time: 332ms
memory: 64912kb

input:

1
199998 35667463938291 8255384928693
770468016026697053 519790816750772730 110085058423772871 85144239858008037 782003096084947976 938498644167289660 693768718229582367 242186248813489674 155335549252315364 428982852761422230 890445026369869037 86401573937739054 9122788624365829 63351367715811463 1...

output:

193326

result:

ok 1 number(s): "193326"

Test #6:

score: 0
Accepted
time: 67ms
memory: 7684kb

input:

1
199998 30382921668955 14233448082254
963132297376532181 199422464083525159 322744997549904069 484222268324755182 911994852231141516 486452603601138945 442934186247306449 697067018736912231 391585717434570522 682442472054944522 79264788486972294 313368204441969076 399649435615099454 810055146752799...

output:

-1

result:

ok 1 number(s): "-1"

Test #7:

score: 0
Accepted
time: 285ms
memory: 58948kb

input:

1
200000 47927923462269 1
24665586551853470 302052529263706283 210309971053691602 263076256179345770 857799427692929388 314900213613059794 225906274300855842 877882541418616003 513956968201013413 567629150391542269 663560657201049943 575042209033964444 387676442637519091 186961317429366344 950630734...

output:

0

result:

ok 1 number(s): "0"

Test #8:

score: 0
Accepted
time: 279ms
memory: 56348kb

input:

1
199998 61818605050169 1
165409158781561806 460583142448212326 912671218554176848 626926695695102006 33152959806830617 136688663029016820 174877457605065935 419306800362435196 89763241467680808 834116262786866128 830483250820731866 942265949775152349 147293754228427769 117586183977037844 8168200855...

output:

0

result:

ok 1 number(s): "0"

Test #9:

score: 0
Accepted
time: 277ms
memory: 58912kb

input:

1
199996 34451027260033 1
601283108326080907 366774999584049325 421906214352697372 955853417529868631 15724846216041399 237313052425127959 21985568950819605 990795326302503510 838020773207917956 327286028784534617 668754577944547269 293491049615758976 560132287154617049 178505332245992034 5559649986...

output:

0

result:

ok 1 number(s): "0"

Test #10:

score: 0
Accepted
time: 58ms
memory: 7156kb

input:

1
200000 29187534610932 21950129578571
825099255469982093 186387713027671861 686187988858020000 84398649936510585 404799755268793918 343938261224617536 835021326555656778 414012550526058150 473262296466867769 949711165249895614 876342183912676727 446476677785448323 965973178373470399 211396195851941...

output:

-1

result:

ok 1 number(s): "-1"

Test #11:

score: 0
Accepted
time: 351ms
memory: 65040kb

input:

1
199997 29405605609626 28289738816956
142397526262523706 376764932667952907 458596335650559615 309998508007705361 216906502123233296 997270308488922036 627624046717378857 795390956936077907 455041452649155630 507550903995090795 945772023366794554 886164928026658833 740664590169344757 46022396065308...

output:

199994

result:

ok 1 number(s): "199994"

Test #12:

score: 0
Accepted
time: 269ms
memory: 64588kb

input:

2
53064 111726463850469 1
699764699097067744 693901341124789557 936192127198912674 471397237345629646 57339338518673020 330275460175741176 277844690417194078 346832037195479397 384194477578957186 369530931475729901 783437009257722751 33766787198435970 978743274657154020 728022680382638786 5965748201...

output:

0
0

result:

ok 2 number(s): "0 0"

Test #13:

score: 0
Accepted
time: 152ms
memory: 46176kb

input:

2
86135 126532043457301 1
364939525549488923 331763991963030652 418052566503935602 389200327527950996 223248088765571340 970673647394107710 177103079343576000 220542474217521377 476655819805831981 120317505540454685 584876353613658645 288615905048789050 834361798578942808 23913094970065630 598267059...

output:

0
-1

result:

ok 2 number(s): "0 -1"

Test #14:

score: 0
Accepted
time: 150ms
memory: 45888kb

input:

2
114819 48359228554241 10435302888019
586220278501534443 917827003963097280 562493926325895741 832147339756103774 598789207580673171 30092248715925739 347809122759281987 202961279549277103 26954992614204788 25477890176628825 346240213874791872 935701273590132621 71601416863439116 479976624236884522...

output:

-1
0

result:

ok 2 number(s): "-1 0"

Test #15:

score: 0
Accepted
time: 223ms
memory: 63260kb

input:

2
51745 111115340822721 67934189093410
384004880823650955 20652869941206454 26030297877284505 821820399879575511 900797542879150986 113731242713200216 47022016133737251 798091939356579944 575761259879993980 235315676307469976 172626135747552411 68486068556761355 143910280723620693 60416335438738505 ...

output:

-1
0

result:

ok 2 number(s): "-1 0"

Test #16:

score: 0
Accepted
time: 311ms
memory: 62224kb

input:

2
190655 32089277245186 8619506756687
313636925686617358 451870071979062091 411410323530866491 42956509195506881 447630393674009199 863508035447235453 663740029365028281 533764538570605616 118940275907220185 357308383149237232 441049621449710395 628997155353158776 456432601746051845 8106593168377557...

output:

184083
0

result:

ok 2 number(s): "184083 0"

Test #17:

score: 0
Accepted
time: 260ms
memory: 63304kb

input:

2
50532 206411131207619 1
453908124405692621 462920221744679551 907904756011625936 804821632576418749 93827569616941358 347241015327075451 978208201750742171 834609018152621638 156944026871472980 64996958207346140 686366260594642120 60180419344299670 537873530382922992 170176388394850771 11620871464...

output:

0
0

result:

ok 2 number(s): "0 0"

Test #18:

score: 0
Accepted
time: 262ms
memory: 63444kb

input:

2
48027 120333836960902 1
852731212005209062 641038431282260037 132561713080121959 515369396104032663 719674677958440509 741065267915488017 553188748023480256 631336662948494092 798673521178051212 679314267048932576 944841943701558860 246944235871057242 683112447413388693 475259445129027810 49561621...

output:

0
0

result:

ok 2 number(s): "0 0"

Test #19:

score: 0
Accepted
time: 278ms
memory: 59140kb

input:

2
49149 133285178828754 105395736842425
438730385021926980 353033516195378113 865739746654163321 972190999200412752 103121252277512423 577854906237340101 262738086768730076 380264274946279046 722511171929958464 585388238516141847 65515930476041145 313519865726265646 246858768321542001 31329176568173...

output:

49147
0

result:

ok 2 number(s): "49147 0"

Test #20:

score: 0
Accepted
time: 289ms
memory: 45612kb

input:

2
105395 50078986120418 18340876167195
648281937820433438 261947326564873806 775340723472059206 981294028978258400 672505076534685403 990701863188209735 207121965067693435 577082535084598175 794678100710086611 898694599371396646 463216957702075620 838570651670974795 704470538205573475 77188600378328...

output:

103210
0

result:

ok 2 number(s): "103210 0"

Test #21:

score: 0
Accepted
time: 270ms
memory: 49380kb

input:

2
114532 59348716065946 1
707073926414028020 135039593178301019 936998353144615963 40817963650509678 955840054722887195 637578262041488114 125838856862796599 218263162301917006 702908832064280815 794836944698592827 931716823608350305 381880133001558860 777892097619024781 549655402210414561 907951636...

output:

0
66074

result:

ok 2 number(s): "0 66074"

Test #22:

score: 0
Accepted
time: 233ms
memory: 59128kb

input:

3
509 8687795230109511 1
874419606219949848 805153491719503175 285952137409859859 381199960877552994 577685819318198478 481595434601205925 990498361021007650 28810424367867173 415112651710859761 101880486883721571 262094756535279849 25685369727407668 543952090027824016 248769799722231083 28929310789...

output:

0
0
-1

result:

ok 3 number(s): "0 0 -1"

Test #23:

score: 0
Accepted
time: 117ms
memory: 37416kb

input:

4
25729 263843150705391 1
491550838947319689 460917074245476540 319969923512156280 347939758910402247 234935003049570013 139538312439991103 938469815337154179 153135930050964718 606407473385373897 77576597231426215 964664108861249705 870446742424023567 925472328878405819 99649546101383167 7249250723...

output:

0
-1
-1
0

result:

ok 4 number(s): "0 -1 -1 0"

Test #24:

score: 0
Accepted
time: 262ms
memory: 46376kb

input:

5
7824 645557079670262 1
80319740060576379 902257114558004600 556310632707741861 419577872491566290 701795921206787901 106467831854187382 992427678429308416 678534956735721416 861787907523555581 315209410214369339 662616011051654647 328153871218769095 71251874457531895 522455281421107435 15379240468...

output:

0
0
13573
0
78463

result:

ok 5 number(s): "0 0 13573 0 78463"

Test #25:

score: 0
Accepted
time: 202ms
memory: 45192kb

input:

6
7149 595755394942255 336876686334919
965682703170081996 214427422831972903 573218798849951317 658843399049010933 969188838872744585 508591749087738721 787749323926366685 279746910537782306 756836530142797090 540505521979477156 615521425138729578 461169630014704430 119893359795981508 35894974827370...

output:

7106
-1
-1
-1
73610
35333

result:

ok 6 numbers

Test #26:

score: 0
Accepted
time: 157ms
memory: 34832kb

input:

7
16819 320863505902163 1
344714517404817616 188563574326191698 8515567256960253 543379079483130670 907355032430402423 632866711308714497 172149404648522581 439462059727441010 462446164925946952 426152051217462244 146996734556435803 343664725111360292 498139862692201254 744172815046861183 6614663413...

output:

0
-1
0
40363
0
0
0

result:

ok 7 numbers

Test #27:

score: 0
Accepted
time: 131ms
memory: 36732kb

input:

8
29021 385916515536371 1
815585899245870081 701802878187931277 746329504664167115 632670899688368917 975908301199465872 753145030746489310 81085730043050997 823300028389724881 165191918211637999 72258561923905720 933666487618388570 182398252960194399 600244335291487267 400133338147932369 3472393894...

output:

0
-1
-1
0
-1
0
0
-1

result:

ok 8 numbers

Test #28:

score: 0
Accepted
time: 202ms
memory: 35416kb

input:

9
37136 181297537035873 1
833350010023202701 870378885569799984 742749624865077638 584855847695417201 491119081178402465 16941760736438165 665763377206966428 333854817955377254 845243250208505747 142810782769571050 178378864226694959 86145376271143451 70700909971178524 953613629614431758 72183106198...

output:

0
-1
0
33560
0
-1
0
0
0

result:

ok 9 numbers

Test #29:

score: 0
Accepted
time: 125ms
memory: 30816kb

input:

10
5543 824244699001522 571613447523814
960374413603645090 372265795494869323 157855393051101619 91904466243955025 510545117928562700 992130424389568546 216380470194378947 790239978630243610 467848021057973585 223343367503504904 228256507753893684 197620173785049384 795530519242127812 85545388545704...

output:

5539
0
-1
-1
-1
-1
0
-1
0
0

result:

ok 10 numbers

Test #30:

score: 0
Accepted
time: 180ms
memory: 28512kb

input:

100
2336 3588450315418108 1
43945823274055773 514617468032557350 177210173305151877 224515244330342028 25308395181317136 529900857025400008 200085674181936891 942061137499603772 875836576152554014 157640788957726599 350489650918792106 911699052264635193 439332807718886405 653360193648558682 32877327...

output:

0
160
220
0
1336
0
2060
0
0
8614
-1
1894
1679
-1
0
-1
162
0
2252
0
0
39
1648
-1
538
0
-1
-1
739
0
0
-1
629
0
124
0
0
-1
0
1156
169
-1
1184
0
2307
0
0
-1
0
0
1902
-1
-1
3209
-1
0
0
20
0
751
0
0
285
4681
0
0
0
470
0
-1
-1
194
0
1910
0
11204
1742
0
636
0
-1
0
-1
-1
0
4073
3580
0
0
5380
0
219
0
-1
722
0...

result:

ok 100 numbers

Test #31:

score: 0
Accepted
time: 171ms
memory: 26288kb

input:

101
92 44080773293761828 1
50223092678158559 358494954680967333 100718032274138433 718459507808345619 570829546302958191 943051640828009604 485716202203373032 782650038347005456 120729328342162197 10154653643322162 972303641662189296 246841224277531399 10586357478909740 496584704775961443 2373099292...

output:

0
0
0
2077
0
-1
4494
-1
-1
3461
0
0
-1
2316
0
0
0
5
-1
0
0
0
0
1588
0
0
0
0
1838
1747
4098
659
1023
-1
0
-1
0
-1
3523
2890
0
0
0
0
0
0
0
0
1320
-1
273
-1
-1
883
414
0
122
0
6598
0
0
0
0
264
0
0
0
0
-1
0
0
0
0
-1
0
696
-1
0
0
0
-1
-1
613
0
0
0
-1
0
0
0
-1
482
-1
-1
0
-1
1974
0
0
714
0

result:

ok 101 numbers

Test #32:

score: -100
Wrong Answer
time: 176ms
memory: 26464kb

input:

102
8381 684296342989948 580156570869449
948885747123969809 294293265386179222 153176227758242947 178660132353644160 32526519043258869 697748596881109647 903440483112729565 821349118998550511 801468922734132472 137775877473252795 679112148650313037 240780797320708556 42180935441067387 89820464090814...

output:

-1
0
3730
0
0
0
313
0
0
0
0
0
0
0
0
691
-1
0
0
-1
0
0
0
1386
-1
-1
0
0
0
2627
0
-1
0
-1
-1
368
-1
0
-1
0
0
576
0
2813
1724
5188
0
-1
1113
5038
2289
0
0
0
1234
5369
246
195
0
3272
0
-1
0
0
723
0
0
0
0
24
17
0
1226
-1
-1
1740
-1
2765
0
0
1175
-1
0
0
0
0
0
2783
2071
0
3632
1797
0
-1
0
0
-1
10212
0
3912...

result:

wrong answer 89th numbers differ - expected: '2070', found: '2071'