QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#610216#8591. ShopsHuangHanSheng13 452ms53140kbC++201.9kb2024-10-04 15:17:402024-10-04 15:17:40

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 19992kb

input:

3 3
1 2 3
2 3 1
1 3 2

output:

2
DBB

result:

wrong answer your claimed answer is 2, but the inconveniences of your plan is actually 3

Subtask #2:

score: 13
Accepted

Test #11:

score: 13
Accepted
time: 344ms
memory: 50540kb

input:

500000 499999
1 2 776715136
2 3 406881694
3 4 265792290
4 5 507607272
5 6 182246639
6 7 997847597
7 8 164130256
8 9 278962226
9 10 411194641
10 11 363646402
11 12 672225656
12 13 494629089
13 14 717664153
14 15 121619271
15 16 476857704
16 17 301215244
17 18 810217743
18 19 850722975
19 20 10710274
...

output:

998789691
DBBDBDBDBBDBDBDBDBBDBDBDBDBDBDBDBDBBDBDBBDBBDBBDBDBBDBDBDBDBBDBDBDBDBDBDBDBBDBDBDBBDBDBDBBDBDBDBBDBBDBDBDBBDBDBBDBBDBDBDBDBBDBBDBDBBDBBDBDBBDBDBDBDBDBBDBBDBDBBDBDBBDBBDBDBBDBBDBBDBDBDBDBBDBDBDBDBDBDBDBBDBDBDBDBDBBDBDBDBDBBDBBDBDBDBBDBDBDBDBBDBDBDBBDBDBBDBDBDBDBBDBDBBDBBDBBDBDBDBDBDBBDBDBDB...

result:

ok inconveniences = 998789691

Test #12:

score: 13
Accepted
time: 355ms
memory: 50492kb

input:

500000 499999
1 2 919029898
2 3 967926553
3 4 537841283
4 5 789574589
5 6 84356111
6 7 262979300
7 8 81760204
8 9 934833222
9 10 815362560
10 11 765318578
11 12 133878729
12 13 42184040
13 14 683417496
14 15 330426787
15 16 252037344
16 17 246808442
17 18 218647305
18 19 390164712
19 20 304437162
20...

output:

998086576
DBBDBDBDBDBDBBDBDBBDBDBDBDBDBBDBDBBDBDBBDBDBDBDBDBBDBDBDBDBBDBBDBBDBDBBDBDBDBDBBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBBDBDBDBDBDBDBDBDBDBBDBDBBDBBDBDBDBBDBDBDBDBDBDBDBBDBBDBBDBBDBDBBDBBDBDBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBDBDBDBBDBBDBDBBDBDBDBDBBDBDBDBDBDBDBDBDBBDBDBDBDBDBD...

result:

ok inconveniences = 998086576

Test #13:

score: 13
Accepted
time: 355ms
memory: 50432kb

input:

500000 499999
1 2 495717169
2 3 2736566
3 4 246490731
4 5 676348793
5 6 433656165
6 7 300871636
7 8 877832205
8 9 24348676
9 10 904055276
10 11 110426018
11 12 943185526
12 13 820883221
13 14 622560418
14 15 960692040
15 16 630347197
16 17 390849180
17 18 366668667
18 19 919683360
19 20 161247567
20...

output:

999027362
DBDBBDBBDBDBDBBDBDBDBDBBDBDBDBBDBBDBDBDBBDBDBDBDBBDBBDBBDBDBDBBDBDBBDBDBDBDBBDBBDBBDBDBDBDBDBDBBDBBDBBDBDBDBDBDBDBBDBBDBDBBDBBDBDBDBBDBDBDBDBDBBDBBDBBDBDBBDBBDBDBDBDBBDBBDBDBBDBDBBDBDBDBDBBDBDBBDBDBDBDBDBDBBDBDBBDBDBDBDBBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBBDBDBBDBDBDBDBBDBBDBDBBDBBDBDBDBDBDBDB...

result:

ok inconveniences = 999027362

Test #14:

score: 13
Accepted
time: 357ms
memory: 50556kb

input:

500000 499999
1 2 881926628
2 3 878365295
3 4 189444416
4 5 196764012
5 6 937066345
6 7 492929211
7 8 404162136
8 9 294189704
9 10 648590434
10 11 205708308
11 12 917107337
12 13 430038581
13 14 988914191
14 15 996853504
15 16 766772044
16 17 551967939
17 18 98588609
18 19 726003769
19 20 770678124
...

output:

998870338
DBBDBBDBDBDBDBBDBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBBDBDBDBDBDBBDBDBDBDBDBBDBBDBBDBDBDBBDBDBBDBDBDBBDBBDBDBDBDBBDBBDBBDBBDBDBBDBDBDBDBDBBDBBDBBDBDBDBDBDBDBBDBBDBBDBDBDBDBBDBBDBDBDBDBDBDBBDBDBBDBDBDBDBDBDBDBDBBDBBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBBDBBDBDBBDBDBDBBDBBDBDBBDBDBDBBDBDBBDBDBBDBBDBDBDBD...

result:

ok inconveniences = 998870338

Test #15:

score: 13
Accepted
time: 352ms
memory: 50560kb

input:

500000 499999
1 2 275555710
2 3 928907994
3 4 351852867
4 5 739735339
5 6 757618705
6 7 186440113
7 8 817785536
8 9 958144538
9 10 65474464
10 11 881281553
11 12 537108380
12 13 419150600
13 14 786449308
14 15 645606967
15 16 757995051
16 17 9350371
17 18 413220186
18 19 856401635
19 20 774467299
20...

output:

998341670
DBBDBBDBBDBDBBDBDBBDBBDBBDBDBDBBDBBDBBDBBDBDBDBDBDBBDBDBDBDBDBDBDBBDBDBDBDBBDBBDBDBDBDBDBDBDBBDBDBDBDBDBBDBBDBDBBDBDBDBDBDBBDBBDBDBBDBDBBDBDBDBDBDBBDBDBDBDBDBBDBDBDBDBDBDBBDBBDBDBDBDBDBDBBDBDBDBDBDBBDBBDBDBDBDBDBDBDBDBDBBDBBDBDBDBDBDBDBBDBDBDBBDBBDBDBDBBDBDBDBBDBBDBDBBDBDBBDBDBDBDBDBDBBDBD...

result:

ok inconveniences = 998341670

Test #16:

score: 13
Accepted
time: 363ms
memory: 50484kb

input:

500000 499999
1 2 2726164
2 3 814453419
3 4 77779202
4 5 212522091
5 6 575026293
6 7 111411302
7 8 671949780
8 9 598712779
9 10 513069672
10 11 622002136
11 12 606394125
12 13 554104755
13 14 693830694
14 15 464592249
15 16 176186577
16 17 170141847
17 18 84481371
18 19 18806105
19 20 887306486
20 2...

output:

998639500
DBBDBBDBDBBDBBDBDBDBDBDBDBDBBDBDBDBBDBBDBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBDBDBBDBBDBDBDBBDBBDBDBDBDBBDBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBBDBBDBDBDBDBBDBDBDBDBDBDBBDBDBDBDBDBDBBDBDBDBDBBDBDBDBBDBDBDBDBDBDBBDBDBDBDBDBDBDBBDBDBBDBBDBDBBDBDBDBDBDBBDBBDBDBDBDBDBDBBDBBDBDBBDB...

result:

ok inconveniences = 998639500

Test #17:

score: 13
Accepted
time: 351ms
memory: 50472kb

input:

500000 499999
1 2 699534547
2 3 756875816
3 4 650330256
4 5 385184303
5 6 252347359
6 7 572617046
7 8 54010889
8 9 947248022
9 10 691017140
10 11 281775875
11 12 804678960
12 13 796483137
13 14 721881104
14 15 799196727
15 16 932579324
16 17 778572034
17 18 156714181
18 19 173646893
19 20 854532026
...

output:

998386205
DBBDBDBDBDBBDBDBDBDBDBDBDBBDBDBDBBDBDBDBDBDBDBDBDBDBBDBDBDBDBDBDBBDBDBDBBDBDBDBDBBDBBDBDBBDBDBDBBDBBDBDBBDBDBBDBBDBDBDBDBDBBDBBDBBDBBDBBDBBDBDBDBBDBDBDBDBBDBDBBDBBDBBDBDBBDBBDBDBDBDBBDBBDBDBBDBBDBDBDBBDBBDBDBDBDBDBDBBDBDBDBDBDBBDBDBDBDBDBDBDBBDBBDBDBBDBDBBDBBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBB...

result:

ok inconveniences = 998386205

Test #18:

score: 13
Accepted
time: 355ms
memory: 50556kb

input:

500000 499999
1 2 528281229
2 3 544813983
3 4 970327172
4 5 223929886
5 6 297537831
6 7 701582097
7 8 321477324
8 9 508501108
9 10 187475004
10 11 847549963
11 12 25037993
12 13 730505330
13 14 934227167
14 15 42350450
15 16 716244922
16 17 577182613
17 18 47412695
18 19 403130619
19 20 783335054
20...

output:

998268275
DBDBDBBDBDBDBBDBDBDBBDBBDBDBDBBDBBDBDBDBDBDBDBDBDBDBDBDBDBDBDBBDBBDBBDBDBDBDBDBDBDBDBBDBDBDBBDBDBBDBDBBDBDBDBDBBDBDBDBBDBDBBDBDBDBDBDBDBDBDBBDBBDBDBDBDBBDBDBBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBBDBDBDBDBBDBBDBBDBDBDBBDBDBBDBDBDBDBDBDBBDBDBDBDBDBBDBDBDBBDBDBDBDBDBDBDBBDBDBBDBDBDBDBDBDBBDBBDBBDBD...

result:

ok inconveniences = 998268275

Test #19:

score: 13
Accepted
time: 343ms
memory: 50432kb

input:

500000 499999
1 2 176647181
2 3 430435019
3 4 142683460
4 5 760806099
5 6 691983032
6 7 640928945
7 8 564806640
8 9 587621269
9 10 656576849
10 11 810001387
11 12 295415472
12 13 676473367
13 14 495893801
14 15 236356194
15 16 896384046
16 17 853257263
17 18 531811298
18 19 914837617
19 20 540207783...

output:

998100668
DBBDBDBDBDBDBDBBDBBDBDBDBDBBDBDBDBDBDBBDBDBDBDBDBDBDBBDBDBBDBDBBDBDBDBBDBDBBDBDBDBBDBBDBDBDBDBDBDBDBBDBDBDBDBDBDBDBBDBDBDBDBDBBDBDBBDBDBDBDBDBBDBDBDBDBDBDBDBDBDBDBBDBDBBDBDBDBBDBDBBDBDBBDBDBDBBDBDBBDBDBBDBDBBDBDBBDBDBBDBDBBDBBDBDBDBDBDBDBBDBBDBDBBDBBDBDBDBBDBDBDBDBDBBDBDBDBDBDBDBBDBDBBDBDB...

result:

ok inconveniences = 998100668

Test #20:

score: 13
Accepted
time: 347ms
memory: 50500kb

input:

500000 499999
1 2 459441093
2 3 712179264
3 4 462698877
4 5 428755230
5 6 140982872
6 7 333359430
7 8 145590701
8 9 605794157
9 10 885201977
10 11 992315213
11 12 787968819
12 13 693140189
13 14 777613982
14 15 486848706
15 16 417423069
16 17 904399877
17 18 169733516
18 19 650464517
19 20 956947852...

output:

998576988
DBBDBDBDBDBDBBDBBDBBDBDBDBDBDBDBDBBDBDBDBDBBDBDBDBBDBDBBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBBDBDBDBDBBDBDBDBBDBDBDBBDBDBDBDBBDBDBBDBDBDBBDBBDBDBBDBDBDBDBDBBDBBDBDBDBDBBDBDBDBDBDBDBDBBDBDBDBDBBDBDBBDBBDBBDBDBDBDBDBBDBDBBDBDBDBBDBDBDBDBBDBDBBDBDBDBDBDBDBBDBDBBDBBDBDBBDBBDBBDBBDBDBBDBDBBDBDBBDBBD...

result:

ok inconveniences = 998576988

Subtask #3:

score: 0
Wrong Answer

Dependency #2:

100%
Accepted

Test #21:

score: 0
Wrong Answer
time: 452ms
memory: 53140kb

input:

500000 499999
1 498191 98644113
4 407741 285960522
9 2593 142219271
10 231716 692978475
11 281544 395541063
12 425498 656170589
13 383980 504747359
19 160252 266870005
21 153907 259282410
23 150872 408664227
24 364918 305130116
29 206272 807953223
32 114552 837969530
33 446658 296132297
34 445587 53...

output:

998686032
DBBDBDBDBDBDBDBBDBBDBDBDBDBBDBBDBDBDBDBDBBDBDBBDBDBBDBBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBBDBBDBDBDBBDBBDBBDBDBDBBDBBDBBDBBDBDBBDBDBBDBDBDBBDBDBBDBDBDBDBDBBDBDBDBBDBBDBBDBDBDBDBBDBDBDBDBDBDBDBDBDBBDBDBDBDBBDBBDBDBBDBDBDBDBDBDBDBBDBDBBDBDBDBDBDBBDBBDBBDBDBBDBDBDBDBDBDBDBDBDBDBDBDBBDBBDBDBD...

result:

wrong answer your claimed answer is 998686032, but the inconveniences of your plan is actually 6124109557

Subtask #4:

score: 0
Wrong Answer

Test #31:

score: 0
Wrong Answer
time: 265ms
memory: 45768kb

input:

366489 397001
2 127909 1
7 171229 1
8 158597 1
11 282213 1
14 356007 1
15 286102 1
16 93205 1
17 260111 1
18 138962 1
20 359938 1
29 223905 1
31 357684 1
32 259968 1
34 65205 1
37 200276 1
41 83195 1
43 159858 1
48 332277 1
50 320322 1
51 338467 1
53 262785 1
55 83815 1
56 173198 1
58 169473 1
63 19...

output:

1
DBBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBD...

result:

wrong answer your claimed answer is 1, but the inconveniences of your plan is actually 8

Subtask #5:

score: 0
Skipped

Dependency #1:

0%