QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#556941#7790. 最短路求和5un_xiaomivita_mbox100 ✓740ms93192kbC++174.2kb2024-09-10 22:29:532024-09-10 22:29:54

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 20ms
memory: 44780kb

input:

300 1300
90 125 9397
157 77 3704
197 112 8218
152 235 1702
271 107 5600
117 92 1401
104 61 2242
127 230 1471
91 116 2740
29 127 4326
151 78 2569
273 241 7487
170 115 3100
152 171 2504
193 95 5921
30 281 1309
285 262 6462
100 265 8151
200 90 277
237 151 1123
231 219 974
238 176 2239
89 147 2256
233 2...

output:

324731073

result:

ok single line: '324731073'

Test #2:

score: 10
Accepted
time: 2ms
memory: 24420kb

input:

300 299
168 161 181
71 254 4119
160 298 8533
148 29 4098
277 279 73
204 174 644
230 113 1265
89 194 6883
296 21 1759
280 190 4793
298 86 3667
185 67 7427
163 257 7845
15 54 8936
52 22 2786
154 199 5543
136 278 4548
256 27 9557
147 34 4208
255 292 1753
242 300 619
263 37 2565
215 109 866
75 153 4924
...

output:

3693554127

result:

ok single line: '3693554127'

Test #3:

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

input:

300 299
278 277 2650
247 246 4859
110 111 138
293 294 3261
261 262 4054
85 84 6692
135 136 2929
154 153 9014
295 296 8688
212 213 7459
233 234 1563
63 64 9100
123 122 6289
275 274 3781
98 97 530
18 17 2851
261 260 260
61 62 1601
143 142 588
174 175 4724
105 104 2084
285 286 6458
75 76 3094
186 185 6...

output:

21433726951

result:

ok single line: '21433726951'

Test #4:

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

input:

300 300
275 55 6088
139 229 1932
106 297 9861
186 220 3110
146 202 634
270 269 2005
22 233 4461
108 139 7146
11 246 8665
187 236 417
90 9 7925
95 211 7057
7 147 4672
38 63 5056
18 22 7299
60 34 7068
155 114 4061
141 128 4442
266 185 2635
221 187 4869
96 243 6720
87 227 8371
70 196 3403
175 290 3159
...

output:

3860396713

result:

ok single line: '3860396713'

Subtask #2:

score: 10
Accepted

Test #5:

score: 10
Accepted
time: 16ms
memory: 28256kb

input:

100000 99999
54625 54626 7146
20763 20764 300
41530 41531 9968
37448 37449 7434
81056 81055 700
27731 27730 8783
12408 12409 514
90652 90653 99
84104 84105 2524
83093 83094 195
17757 17756 2560
81925 81926 8935
14220 14219 9619
25516 25515 5883
89413 89412 275
46936 46937 3997
82755 82754 2775
53080...

output:

834269687204155387

result:

ok single line: '834269687204155387'

Test #6:

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

input:

100000 99999
13706 21290 3420
3037 78334 3887
94743 35121 9291
67873 91038 345
48348 12825 56
25237 56325 19
44215 92806 6788
40110 98929 5038
43250 87034 907
19698 18774 44
79406 51075 9523
79992 15613 4062
91111 66707 1595
1223 12300 3924
65613 22546 9008
24856 20394 393
14915 86273 5876
39594 160...

output:

4573680940298584

result:

ok single line: '4573680940298584'

Subtask #3:

score: 10
Accepted

Test #7:

score: 10
Accepted
time: 22ms
memory: 36804kb

input:

100000 100000
35241 48789 5098
4546 39869 6127
31415 22834 6026
25703 1952 6807
86143 78951 3421
34193 9615 4329
31012 98959 1664
81244 37874 3542
600 74315 9939
91066 57088 2111
5064 33313 9799
78834 28718 1133
41687 82171 4214
44801 87500 4238
40150 73606 5172
17787 30281 3718
52715 82529 4419
924...

output:

3317259529562659

result:

ok single line: '3317259529562659'

Test #8:

score: 10
Accepted
time: 20ms
memory: 35316kb

input:

100000 100000
45035 91419 579
57950 84820 2866
89160 29146 2750
87309 96239 135
1932 78121 5243
72536 91944 8466
89557 37259 9516
26079 66778 2699
63510 69399 8539
77547 58834 2244
53857 24982 5272
81809 33349 6648
78486 82374 4634
4290 81980 2143
4305 91524 4722
99911 87695 1124
91290 10670 2828
24...

output:

3401469393921409

result:

ok single line: '3401469393921409'

Subtask #4:

score: 30
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #9:

score: 30
Accepted
time: 20ms
memory: 37072kb

input:

100000 100020
80942 35082 1070
97375 16208 4147
33462 96122 7583
83987 22763 1859
69816 43966 8458
91076 6312 1456
48229 88568 1216
5646 80520 5669
630 34701 3490
79455 92863 4483
82919 50914 4411
90738 90713 4038
78668 71114 3542
29889 64989 400
32720 8892 7829
34321 83166 8197
34269 51783 4880
424...

output:

2809946608338124

result:

ok single line: '2809946608338124'

Test #10:

score: 30
Accepted
time: 16ms
memory: 37344kb

input:

100000 100015
98331 83582 7895
93949 17231 3865
41346 33829 5772
68579 64611 4890
97066 15931 8470
23519 16210 7610
83428 94496 9636
77003 54473 8363
76473 2967 3280
92971 37996 8024
52212 59305 2443
61584 62285 1153
21759 48582 5405
92239 69556 7922
4669 37960 4506
98977 26204 8359
37340 21762 8572...

output:

2718711746853256

result:

ok single line: '2718711746853256'

Subtask #5:

score: 10
Accepted

Dependency #4:

100%
Accepted

Test #11:

score: 10
Accepted
time: 52ms
memory: 40724kb

input:

100000 100200
46607 47644 6106
18789 57786 6831
80531 53017 5099
51323 81930 4938
2392 55111 106
173 62790 7391
76201 68945 7800
74475 36216 1927
40012 93955 9401
11647 59189 1593
38460 38979 3677
58660 18294 7006
61995 30505 3433
13303 4262 8512
17427 94701 2526
13535 11165 6222
41006 55065 3606
33...

output:

1758276815564426

result:

ok single line: '1758276815564426'

Test #12:

score: 10
Accepted
time: 38ms
memory: 40800kb

input:

100000 100150
43703 28120 7591
38089 79374 9191
91185 16344 6472
83305 60686 2168
23459 11218 8650
61282 60699 1054
48202 92355 5281
56954 29359 7663
87528 39260 3006
25382 23529 4543
62821 56790 102
61741 57827 4611
40262 63180 5091
38765 91169 3936
97982 25454 2401
75893 24781 9749
51463 7055 123
...

output:

1800383711576977

result:

ok single line: '1800383711576977'

Test #13:

score: 10
Accepted
time: 41ms
memory: 49236kb

input:

100000 100200
18921 54791 9090
80383 26351 3183
49636 36433 4563
8044 11575 9738
25625 69903 1264
74250 36993 9342
39034 14612 5901
52831 39306 5070
43550 61362 1047
82355 10842 9096
68109 12208 2317
70592 67828 6218
7213 2575 5905
94237 18589 3472
87836 19167 150
58101 84039 501
34193 77652 2803
42...

output:

1710604951106849

result:

ok single line: '1710604951106849'

Subtask #6:

score: 30
Accepted

Dependency #1:

100%
Accepted

Dependency #5:

100%
Accepted

Test #14:

score: 30
Accepted
time: 740ms
memory: 82628kb

input:

100000 101000
51143 85180 6424
48266 54227 4966
44135 91311 5635
29646 31024 8441
23337 59331 501
37360 86881 8417
79954 48011 5611
5147 49093 888
45865 66176 5881
9314 58439 2604
63379 78511 4360
33085 74928 7965
17119 67682 4747
57368 56591 2108
24967 72804 8449
58756 73315 9823
39070 97400 2221
1...

output:

1109083280039138

result:

ok single line: '1109083280039138'

Test #15:

score: 30
Accepted
time: 723ms
memory: 93192kb

input:

100000 101000
81650 9640 8613
90459 50998 8391
48994 61932 3256
35119 73989 4365
45062 12930 8041
52942 37942 7952
29952 78543 9165
18443 80815 4843
58232 12571 791
90267 72263 6019
25396 61771 849
80796 66418 7845
97380 65763 3585
34159 92923 9192
77650 84261 6479
57768 20032 5244
5530 38694 7775
4...

output:

1098688891417840

result:

ok single line: '1098688891417840'

Test #16:

score: 30
Accepted
time: 732ms
memory: 92840kb

input:

100000 101000
51112 13530 5887
76762 87778 9877
93531 56549 649
51639 92175 9607
6628 93994 8880
86964 86098 4161
60766 26009 438
32686 20922 1370
59970 23846 119
24335 86489 3022
75100 55339 6460
95828 74361 8592
5663 10462 8523
80869 79799 6473
54699 23386 277
1075 63046 6553
44049 84328 9927
9681...

output:

1092770348411518

result:

ok single line: '1092770348411518'

Test #17:

score: 30
Accepted
time: 200ms
memory: 69540kb

input:

100000 100500
51310 27364 7284
84365 21772 3127
90150 72198 577
41270 17446 5703
80779 7157 4625
81265 73476 7805
49045 48207 7328
18838 94503 5120
83624 69166 1123
59410 55132 3464
41582 79412 3855
99361 55526 394
71379 97775 7606
58522 36158 9470
29295 22105 7720
46944 40580 5205
22797 47933 1600
...

output:

1358562669259231

result:

ok single line: '1358562669259231'