QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#112290#553. 王国hyforces#100 ✓303ms187240kbC++205.2kb2023-06-11 07:05:442024-04-28 07:16:08

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 10
Accepted
time: 0ms
memory: 31296kb

input:

10
1 2 50
2 3 59
2 4 73
1 5 79
4 6 10
1 7 66
1 8 43
4 9 4
8 10 30
8
39 2 72 38 78 95 10
45 98 29 59 98 5 32
10
46 36 43 69 61 95 96 14 7
76 99 100 13 58 9 69 31 63
9
43 83 68 96 72 91 39 17
66 53 22 13 2 32 58 91
14
41 36 73 96 55 90 6 24 14 39 21 67 27
80 7 99 20 24 61 27 7 71 95 45 35 95
10
64 45 ...

output:

1956394

result:

ok single line: '1956394'

Test #2:

score: 10
Accepted
time: 3ms
memory: 30580kb

input:

5
1 2 250
2 3 659
2 4 273
1 5 879
20
439 502 872 138 178 295 610 746 636 143 969 261 595 396 114 7 943 83 768
145 898 829 359 398 905 232 176 299 400 413 558 9 969 531 963 366 853 822
18
696 672 591 739 617 641 336 973 96 455 290 906 124 814 239 221 367
713 902 832 58 791 680 7 99 320 224 761 127 50...

output:

15675138

result:

ok single line: '15675138'

Test #3:

score: 10
Accepted
time: 18ms
memory: 38384kb

input:

10000
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
1 11 143542613
7 12 474833170
10 13 998097158
13 14 131570934
14 15 404280279
12 16 505795336
10 17 636807827
1 18 101929268
9 19 704877634
2 20 624379150
20 21 784558822
...

output:

453173522

result:

ok single line: '453173522'

Test #4:

score: 10
Accepted
time: 148ms
memory: 104812kb

input:

100000
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
1 11 143542613
7 12 474833170
10 13 998097158
13 14 131570934
14 15 404280279
12 16 505795336
10 17 636807827
1 18 101929268
9 19 704877634
2 20 624379150
20 21 784558822...

output:

181864911

result:

ok single line: '181864911'

Test #5:

score: 10
Accepted
time: 67ms
memory: 58464kb

input:

1
100001
990117072 121266257 502101444 506187797 152265724 887855716 21575364 747489891 3913373 252828825 925488373 869945258 957255916 909604725 337241170 254650067 235485017 619901983 240912374 769328282 249600354 66310996 621433473 134246045 799368852 533841194 911465239 114696140 236494004 44433...

output:

672785783

result:

ok single line: '672785783'

Test #6:

score: 10
Accepted
time: 303ms
memory: 157928kb

input:

10
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
49733
22624218 300982665 75514183 17307023 151891674 818814124 681421086 983939896 975213637 388337097 728609775 503839345 909679593 275227646 722966525 313571842 143077312 3...

output:

5175380

result:

ok single line: '5175380'

Test #7:

score: 10
Accepted
time: 264ms
memory: 148852kb

input:

100
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
1 11 143542613
7 12 474833170
10 13 998097158
13 14 131570934
14 15 404280279
12 16 505795336
10 17 636807827
1 18 101929268
9 19 704877634
2 20 624379150
20 21 784558822
14...

output:

691155161

result:

ok single line: '691155161'

Test #8:

score: 10
Accepted
time: 227ms
memory: 161400kb

input:

1000
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
1 11 143542613
7 12 474833170
10 13 998097158
13 14 131570934
14 15 404280279
12 16 505795336
10 17 636807827
1 18 101929268
9 19 704877634
2 20 624379150
20 21 784558822
1...

output:

265274205

result:

ok single line: '265274205'

Test #9:

score: 10
Accepted
time: 189ms
memory: 172688kb

input:

10000
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
1 11 143542613
7 12 474833170
10 13 998097158
13 14 131570934
14 15 404280279
12 16 505795336
10 17 636807827
1 18 101929268
9 19 704877634
2 20 624379150
20 21 784558822
...

output:

682655928

result:

ok single line: '682655928'

Test #10:

score: 10
Accepted
time: 295ms
memory: 187240kb

input:

100000
1 2 282475250
2 3 984943659
2 4 470211273
1 5 457850879
4 6 7237710
1 7 115438166
1 8 74243043
4 9 137522504
8 10 16531730
1 11 143542613
7 12 474833170
10 13 998097158
13 14 131570934
14 15 404280279
12 16 505795336
10 17 636807827
1 18 101929268
9 19 704877634
2 20 624379150
20 21 784558822...

output:

702441060

result:

ok single line: '702441060'