QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#115059#4559. 汽水olriutre100 ✓4533ms21136kbC++174.6kb2023-06-24 15:44:442023-06-24 15:44:45

详细

Test #1:

score: 5
Accepted
time: 11ms
memory: 7752kb

input:

1000 176
2 1 29882
3 2 32829
4 1 62186
5 1 76969
6 5 59457
7 5 31012
8 6 60749
9 8 94907
10 4 50876
11 7 57467
12 8 10730
13 6 47455
14 1 47880
15 4 84575
16 13 55937
17 9 79407
18 15 9864
19 12 10781
20 19 44014
21 9 43842
22 21 94372
23 15 41326
24 9 66883
25 17 74764
26 17 41776
27 14 11195
28 26...

output:

158

result:

ok 1 number(s): "158"

Test #2:

score: 5
Accepted
time: 8ms
memory: 5728kb

input:

1000 293
2 1 34276
3 2 84787
4 1 88574
5 3 68135
6 2 82579
7 6 61560
8 1 47523
9 5 22989
10 9 96571
11 1 17949
12 4 32059
13 5 73429
14 2 8946
15 2 43212
16 7 58853
17 13 28834
18 14 69209
19 1 97085
20 2 44469
21 20 48826
22 2 85909
23 19 28120
24 18 70651
25 20 83132
26 10 93780
27 4 85517
28 22 6...

output:

53

result:

ok 1 number(s): "53"

Test #3:

score: 5
Accepted
time: 26ms
memory: 5684kb

input:

1000 9342979369048
1 2 188744166141
2 3 3257182255339
2 4 738418003587
2 5 9010676175009
5 6 80506566145
2 7 137012004289
2 8 9844600727845
6 9 6234047911051
5 10 2278040714756
6 11 9832944156520
8 12 1399521527251
12 13 2006181595521
12 14 3437158741633
7 15 8549204847993
1 16 8585193939060
5 17 35...

output:

1256999579

result:

ok 1 number(s): "1256999579"

Test #4:

score: 5
Accepted
time: 32ms
memory: 7652kb

input:

1000 9447455244261
1 2 2369698142818
1 3 1259866843121
2 4 181695503809
1 5 5395646476801
5 6 1592670115873
1 7 5825650350273
7 8 4907936881
2 9 7994958513025
9 10 4640863251025
7 11 1041053155385
7 12 4635851600169
2 13 1485567098551
7 14 2471251692801
14 15 1502471049345
12 16 896275581501
14 17 2...

output:

15907497140

result:

ok 1 number(s): "15907497140"

Test #5:

score: 5
Accepted
time: 2792ms
memory: 21136kb

input:

50000 2039100470234
2 1 1157115944431
3 2 707111168473
4 3 8397002709418
5 4 3352977040621
6 5 1656924270641
7 6 2459512605055
8 7 1391191923787
9 8 3151740509555
10 9 3540268575901
11 10 131101294171
12 11 3237345289521
13 12 1632729312001
14 13 1509299389963
15 14 1013381655697
16 15 519951748273
...

output:

153975

result:

ok 1 number(s): "153975"

Test #6:

score: 5
Accepted
time: 1927ms
memory: 20400kb

input:

50000 3681335454348
2 1 1567945761865
3 2 1966985086988
4 3 5612130475151
5 4 1974864407921
6 5 2400499013914
7 6 4436413442451
8 7 6737842662811
9 8 622833464877
10 9 5570575341101
11 10 7218080813203
12 11 381899727501
13 12 1842649560961
14 13 1959299967241
15 14 1117565689681
16 15 65298776128
1...

output:

1096933

result:

ok 1 number(s): "1096933"

Test #7:

score: 5
Accepted
time: 2532ms
memory: 19512kb

input:

50000 2138539366954
2 1 477103575677
3 2 1187579931297
4 3 1677282447026
5 4 3049869695761
6 5 1524678206941
7 6 2806828572931
8 7 935061739756
9 8 2777668468993
10 9 8924530255281
11 10 5968284536917
12 11 281512080257
13 12 5153574952873
14 13 1437117745969
15 14 450871049
16 15 3619987179025
17 1...

output:

821997

result:

ok 1 number(s): "821997"

Test #8:

score: 5
Accepted
time: 2851ms
memory: 20000kb

input:

50000 3692576915122
2 1 2726199328393
3 2 11777473381
4 3 7463793625627
5 4 683972650564
6 5 889899933385
7 6 5178488538481
8 7 4808136082751
9 8 1283539499389
10 9 7623364813811
11 10 1307057097633
12 11 511451080141
13 12 6162869255986
14 13 8492780940406
15 14 4485436138437
16 15 3846730170928
17...

output:

1814829

result:

ok 1 number(s): "1814829"

Test #9:

score: 5
Accepted
time: 546ms
memory: 16984kb

input:

50000 23559
2 1 90187
3 1 41454
4 2 50296
5 2 65021
6 3 6875
7 3 79759
8 4 10884
9 4 43491
10 5 73282
11 5 60185
12 6 12230
13 6 22734
14 7 94716
15 7 49633
16 8 22389
17 8 20852
18 9 53855
19 9 67971
20 10 7369
21 10 77133
22 11 53827
23 11 10417
24 12 99613
25 12 43217
26 13 24034
27 13 9290
28 14...

output:

4

result:

ok 1 number(s): "4"

Test #10:

score: 5
Accepted
time: 719ms
memory: 15688kb

input:

50000 1412
2 1 8765
3 1 2547
4 2 9500
5 2 6081
6 3 9392
7 3 9294
8 4 9543
9 4 6779
10 5 9440
11 5 180
12 6 6347
13 6 8172
14 7 2773
15 7 5279
16 8 8960
17 8 8956
18 9 3034
19 9 7636
20 10 6544
21 10 7221
22 11 3011
23 11 9229
24 12 1824
25 12 3372
26 13 9080
27 13 8882
28 14 8507
29 14 4156
30 15 50...

output:

7

result:

ok 1 number(s): "7"

Test #11:

score: 5
Accepted
time: 2597ms
memory: 17276kb

input:

50000 6130279593326
2 1 1191952119601
3 1 3290613675931
4 2 4016890886401
5 2 2116645892341
6 3 2203819057441
7 3 1857862274017
8 4 111955948351
9 4 777041628751
10 5 1272549084911
11 5 6579028599301
12 6 1579717803105
13 6 343886574709
14 7 318559415815
15 7 9116256418246
16 8 6719656634461
17 8 20...

output:

20765734

result:

ok 1 number(s): "20765734"

Test #12:

score: 5
Accepted
time: 2566ms
memory: 15808kb

input:

50000 5883408242301
2 1 906701410901
3 1 7848852534001
4 2 1079193072113
5 2 4540852601793
6 3 5682070246456
7 3 3412329203809
8 4 2117948144302
9 4 2248161854851
10 5 1919501544591
11 5 1856907304961
12 6 3506365131833
13 6 1648457063521
14 7 2451662824173
15 7 4931346940201
16 8 8717797350955
17 8...

output:

32777048

result:

ok 1 number(s): "32777048"

Test #13:

score: 5
Accepted
time: 409ms
memory: 15652kb

input:

50000 9999162525599
2 1 721344839716
3 1 8320802746701
4 1 3348061434829
5 1 6459846604723
6 1 146738321899
7 1 4819907256897
8 1 1567923585469
9 1 297919709641
10 1 588203767297
11 1 599361127501
12 1 9232548388461
13 1 138579952897
14 1 8030339289064
15 1 63257673793
16 1 8730230639121
17 1 325222...

output:

3439142

result:

ok 1 number(s): "3439142"

Test #14:

score: 5
Accepted
time: 406ms
memory: 14528kb

input:

50000 9998176940017
2 1 7333805846615
3 1 9159480600481
4 1 4340392568513
5 1 1374359642239
6 1 1283435785113
7 1 1590536864953
8 1 4167238845481
9 1 2184755846401
10 1 5845287718545
11 1 760662986797
12 1 6628133647873
13 1 9041743658293
14 1 1205409504593
15 1 286987457561
16 1 34280790545
17 1 32...

output:

187880469

result:

ok 1 number(s): "187880469"

Test #15:

score: 5
Accepted
time: 410ms
memory: 14716kb

input:

50000 9997804875460
2 1 3373831106101
3 1 142622342521
4 1 4993063236001
5 1 4838924250756
6 1 371235405235
7 1 3444191281665
8 1 8123432084346
9 1 6278681258726
10 1 383041841789
11 1 4073241015075
12 1 3066939274888
13 1 5385308634406
14 1 32432809583
15 1 8379622286101
16 1 490839296137
17 1 7182...

output:

32979697

result:

ok 1 number(s): "32979697"

Test #16:

score: 5
Accepted
time: 438ms
memory: 14456kb

input:

50000 9997360763661
2 1 128151991801
3 1 2772015679126
4 1 5533941204289
5 1 1743547416076
6 1 2251500180233
7 1 9615380949735
8 1 1409194824145
9 1 7545617001301
10 1 7863842124857
11 1 868267282001
12 1 5600343233941
13 1 3104291015905
14 1 4353852063056
15 1 787059587931
16 1 6385192749552
17 1 1...

output:

85443056

result:

ok 1 number(s): "85443056"

Test #17:

score: 5
Accepted
time: 3249ms
memory: 16556kb

input:

50000 9384549542182
2 1 5042185434521
3 2 93961843561
4 3 1127012769065
5 4 7200582522871
6 5 1111433816065
7 6 2671354989751
8 7 66785702677
9 8 4023897189001
10 9 1469758617441
11 10 9826713798351
12 11 2129321152726
13 12 6550896149701
14 13 3266444145637
15 14 6603662673001
16 15 478131746401
17...

output:

658927049

result:

ok 1 number(s): "658927049"

Test #18:

score: 5
Accepted
time: 4533ms
memory: 18384kb

input:

50000 9681031905131
2 1 2984136928543
3 2 8472401069671
4 3 712230914901
5 4 8738984029651
6 5 577580429251
7 6 442310719501
8 7 5220779600897
9 8 7070495765841
10 9 1731178417501
11 10 4326559711153
12 11 3942448628967
13 12 5034813193
14 13 6769780104889
15 14 60488900001
16 15 714854636623
17 16 ...

output:

544229190

result:

ok 1 number(s): "544229190"

Test #19:

score: 5
Accepted
time: 3739ms
memory: 19928kb

input:

50000 9614240459361
2 1 557307002961
3 2 233593106583
4 3 288919589351
5 4 307090989873
6 5 195217982097
7 6 7770883304241
8 7 8672189914901
9 8 7225264958241
10 9 8545521196369
11 10 1486943354401
12 11 1671229092331
13 12 3995943560251
14 13 550252216144
15 14 3014060900737
16 15 2846465398936
17 ...

output:

4707860

result:

ok 1 number(s): "4707860"

Test #20:

score: 5
Accepted
time: 3726ms
memory: 19992kb

input:

50000 9759892152078
2 1 8216014596676
3 2 376250836501
4 3 8294490663505
5 4 264889680001
6 5 3240888450385
7 6 9275375412019
8 7 840978397729
9 8 110995652846
10 9 6893866238001
11 10 5483667165185
12 11 5283669265173
13 12 7745897351402
14 13 3383191116233
15 14 270362383201
16 15 1525157053057
17...

output:

185439437

result:

ok 1 number(s): "185439437"

Extra Test:

score: 0
Extra Test Passed