QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#74870#3871. Voting CitiesGuanYunchang25 262ms7940kbC++171.6kb2023-02-04 12:36:432023-02-04 12:36:48

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 41ms
memory: 7128kb

input:

5000 10000 1
4683
0 715 579327370
0 954 664830350
0 2453 244225980
0 2918 399241150
0 3929 982683290
1 4944 723915200
2 3725 390369490
3 1370 230814450
3 3348 750421430
3 3408 503334040
4 252 852709300
4 989 474431070
4 1013 466847840
4 4956 152207550
5 4162 271201150
6 3335 991911830
6 3596 4382854...

output:

7570531610

result:

ok single line: '7570531610'

Test #2:

score: 0
Accepted
time: 4ms
memory: 6436kb

input:

5000 4999 1
1299
0 64 377331280
1 3636 982700680
2 3915 477029460
3 4810 393196920
4 3199 772708750
5 974 807412160
6 172 514839640
7 4390 737960950
8 3007 115380210
9 164 180129040
10 3217 244250350
11 3305 624997990
12 2097 203276470
13 3419 805725540
14 2797 934906840
15 2266 782245770
16 3632 56...

output:

1267241546350

result:

ok single line: '1267241546350'

Test #3:

score: 0
Accepted
time: 65ms
memory: 7780kb

input:

5000 10000 1
4932
0 1 242102390
0 3260 760978600
1 2 943188730
2 3 921660880
2 4662 628221750
3 4 237866670
3 5 870214480
4 3429 906351860
5 6 806646100
6 7 225335570
6 968 45416840
7 8 629227600
7 10 39825340
7 3141 397131680
7 4247 675964610
7 4935 646589630
8 9 156003140
8 4388 583428630
9 3931 9...

output:

6287188870

result:

ok single line: '6287188870'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3388kb

input:

5 6 1
1
1 2 621846600
1 3 336827160
3 0 525498650
3 1 126718720
3 4 768175340
4 1 153087190
1
1 -1 -1 -1 -1 -1

output:

0

result:

ok single line: '0'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3356kb

input:

3 3 1
0
0 1 169244410
1 2 409500510
2 0 553080380
1
0 -1 -1 -1 -1 -1

output:

0

result:

ok single line: '0'

Subtask #2:

score: 0
Time Limit Exceeded

Test #6:

score: 0
Time Limit Exceeded

input:

5000 10000 1
939
0 1074 697931020
0 4334 347738890
1 2400 681303040
2 1685 896587820
2 2368 928896100
2 3133 12276450
2 3258 765661210
4 3606 993201320
5 1081 613705100
5 2339 700470170
5 2625 209307440
5 2832 129029550
7 1517 251821020
7 1751 713428320
7 2308 951691550
7 3980 498317440
7 4014 78197...

output:


result:


Subtask #3:

score: 0
Time Limit Exceeded

Test #11:

score: 0
Time Limit Exceeded

input:

5000 10000 2000
366 1016 3277 5 3742 3640 2511 1725 2168 2349 1037 4972 2930 4374 3504 1098 3439 3970 1952 3474 2664 2097 1751 3679 3155 3266 2070 2016 338 1273 2648 4398 3694 2045 3524 1027 839 1898 1795 1192 2975 1756 4707 1548 4984 1891 2364 123 3181 1096 2970 3264 1628 1295 4852 829 4940 2251 37...

output:


result:


Subtask #4:

score: 5
Accepted

Test #16:

score: 5
Accepted
time: 54ms
memory: 7512kb

input:

5000 10000 1
4577
0 248 57534230
0 3020 827662530
0 3190 138424730
1 3154 752916230
4 1256 398736840
5 4116 833556610
5 4127 547494700
6 396 793865570
6 1661 388141660
7 4581 595148940
8 3768 724151300
9 1367 840320860
9 1656 391917460
10 3210 806346090
10 3356 767016610
10 3367 272248610
12 1145 72...

output:

-1

result:

ok single line: '-1'

Test #17:

score: 0
Accepted
time: 13ms
memory: 6400kb

input:

5000 4999 1
1212
0 3971 436288070
1 2759 815489840
2 810 158593560
3 2832 492373670
4 2209 368268770
5 2482 801981570
6 989 201812580
7 4202 350017710
8 2772 560704100
9 2017 156669510
10 4682 92934580
11 3450 514756530
12 3306 895638580
13 4257 871378280
14 1872 922166080
15 1805 346581840
16 1128 ...

output:

1612805668230

result:

ok single line: '1612805668230'

Test #18:

score: 0
Accepted
time: 61ms
memory: 7940kb

input:

5000 10000 1
3608
0 1 810121220
0 2 355065080
0 2896 301650880
0 4717 386184700
2 3 950388340
3 4 477643040
4 5 241940330
4 6 187063440
4 7 130985470
4 2163 577070050
5 1203 806247670
6 3440 245643890
7 8 782485830
7 893 889883080
7 3541 5217960
8 9 942491640
8 11 207075260
8 12 202843280
8 3629 921...

output:

5134464520

result:

ok single line: '5134464520'

Subtask #5:

score: 0
Time Limit Exceeded

Dependency #4:

100%
Accepted

Test #19:

score: 0
Time Limit Exceeded

input:

5000 10000 1
2732
0 2754 813230770
0 3355 792927570
1 1095 752876150
1 1702 60134960
1 3298 58308710
3 2532 545385230
3 3493 519815830
3 3831 87299670
3 4304 819918750
4 1296 129849950
6 171 381977660
6 605 447093590
6 3172 195396460
6 4522 972555440
8 2580 998199040
8 4488 981698540
9 617 151220820...

output:


result:


Subtask #6:

score: 0
Time Limit Exceeded

Test #22:

score: 0
Time Limit Exceeded

input:

5000 10000 200
1044 1225 1941 2497 4667 2566 3603 92 2261 1826 770 4780 127 4386 1948 2156 1504 4511 3119 4006 4473 389 3469 2670 3989 3092 55 670 4525 4965 1038 375 419 2599 4912 3665 4799 2997 4759 1660 1136 2308 1707 4249 3246 625 3378 52 734 4317 4958 3355 869 3361 2010 2300 2809 2635 2241 3441 ...

output:


result:


Subtask #7:

score: 15
Accepted

Test #26:

score: 15
Accepted
time: 247ms
memory: 6704kb

input:

100 1000 10
98 30 76 47 68 72 37 62 38 78
0 40 955510110
0 58 380472040
0 67 471726660
0 75 21910230
0 76 203779460
0 79 619337400
0 92 789108960
0 95 850838250
1 7 708430
1 8 800979960
1 24 529606990
1 25 822365030
1 40 803087030
1 75 339182160
1 79 841073850
1 86 249876300
1 92 93708160
2 6 653731...

output:

410099610
386216320
0
233546015
399770707
276108460
524518580
278520060
521727310
450306330
461649420
464823212
386031210
153282630
127385060
0
131407620
178369240
481426810
403923330
311973790
259478290
167906470
345801959
310169200
240099870
56486000
123774050
263065700
433249160
203779460
2717947...

result:

ok 100 lines

Test #27:

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

input:

100 1000 5
56 95 36 60 62
0 3 192396910
0 22 805335870
0 35 399624690
0 47 499610620
0 56 510076020
0 61 324899250
0 74 732506440
0 76 680413950
1 2 235730090
1 3 515640540
1 5 661788560
1 8 443664920
1 16 84209830
1 27 882274860
1 50 504921340
1 56 452206250
1 69 680192960
1 76 67162500
1 80 594724...

output:

483543930
118596430
106636800
146240560
266101930
377031810
152249730
265604350
393673640
388292710
358911790
250019110
227832147
319580670
74227020
89700330
148624010
306053820
302071574
20982620
34191060
312317250
91892820
75343050
191446180
224783520
326265270
165805090
299111710
103355550
222858...

result:

ok 100 lines

Test #28:

score: 0
Accepted
time: 19ms
memory: 6304kb

input:

100 99 2
24 6
0 23 197416360
1 65 653204870
2 48 895802830
3 2 304965120
4 18 155013130
5 20 643250780
6 80 326094400
7 15 613530510
8 7 27830900
9 28 64986310
10 92 452569930
11 43 209666820
12 98 856446580
13 9 585386760
14 37 87758750
15 21 480701780
16 6 229947490
17 0 416482660
18 70 308710360
...

output:

11394907590
17577497190
1974662330
229947490
21560422139
557697820
13546331963
295764340
16859683496
7284957976
29218886720
5426111488
28267019816
36409480160
7352231543
6325708230
8817367960
1941473558
9648951040
17928324721
16741298696
7702342318
6549052910
31476226575
4680478720
3281744467
229938...

result:

ok 100 lines

Test #29:

score: 0
Accepted
time: 116ms
memory: 5260kb

input:

70 800 10
26 9 17 22 34 0 56 3 32 13
0 13 752543950
0 17 878514670
0 18 394546530
0 31 490617700
0 49 525844750
0 52 895409820
0 56 384845020
0 58 32932060
0 66 520113450
1 6 220247690
1 8 957994970
1 13 991853520
1 17 724453620
1 23 499439780
1 25 335146290
1 31 944771600
1 34 50258960
1 38 7836021...

output:

233262196
178175070
296835810
286834670
250389800
171237940
153094600
353036360
301944760
146352860
216988650
499109423
166244200
0
120796210
0
365822540
247380211
220114046
241220857
316470550
0
131866410
403222622
67497480
357344848
474031410
129889370
112039900
169133800
322748021
79135733
951325...

result:

ok 70 lines

Test #30:

score: 0
Accepted
time: 220ms
memory: 6032kb

input:

90 900 52
79 48 16 56 24 42 81 8 78 65 9 1 51 57 67 59 33 36 49 61 86 58 64 41 6 47 21 18 76 34 71 39 54 82 52 69 11 73 44 2 23 3 20 53 14 30 66 10 27 60 32 38
0 1 117890180
0 2 784309190
0 6 254401860
0 10 727085290
0 28 184275140
0 33 349545050
0 44 609882160
0 68 695751180
0 75 119032860
0 83 705...

output:

5973910
117890180
81511610
0
0
0
0
0
0
0
0
0
277113280
87279710
27070550
48104400
0
0
94235460
0
0
0
0
0
0
169058580
0
0
81644240
88717320
0
35125589
147379930
16869510
297635123
0
0
23828820
90068660
0
167598990
295131330
0
0
0
0
122828740
77348370
0
0
52799160
0
94053560
86120200
85195970
71759820...

result:

ok 90 lines

Test #31:

score: 0
Accepted
time: 23ms
memory: 6468kb

input:

100 99 20
41 94 46 4 64 59 81 42 68 36 69 63 18 96 11 56 74 1 77 93
0 45 107934930
1 84 32786000
2 96 728543090
3 18 933371690
4 72 614853570
5 12 817901020
6 85 239120310
7 69 638798320
8 20 778612350
9 4 641900670
10 70 60796980
11 91 177788090
12 47 162578330
13 58 444163380
14 50 381391910
15 8 ...

output:

4048559590
453672561
1981917660
2443168480
1299316985
0
792658650
1015303356
1492640275
2360280074
0
778272805
0
0
495394784
1785742500
413555570
2281247089
894949276
896647830
681033570
2959003779
5984779565
3922541217
3348458600
1337301613
3267707793
2927313924
0
1979177020
0
1771977066
3923183832...

result:

ok 100 lines

Test #32:

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

input:

100 1000 20
67 75 23 98 64 88 31 29 61 17 35 38 78 76 43 55 7 92 14 26
0 5 454346090
0 16 840201330
0 40 247707810
0 62 716233510
0 71 825289880
0 73 967959420
0 77 528301890
1 5 919109510
1 25 893055090
1 30 713280040
1 42 984094610
1 49 968876810
1 59 770138290
1 67 822562030
1 70 438760060
1 83 2...

output:

215477150
197609870
467721120
0
291323320
0
0
64785670
222821040
263344480
55819220
0
0
279457129
32832490
207385410
189944160
0
260532540
113849089
207141670
187385290
133566040
0
0
193137340
189471080
0
0
104031170
0
381115330
167572520
81182370
186898060
170874590
138753740
0
145215150
65176349
3...

result:

ok 99 lines

Test #33:

score: 0
Accepted
time: 245ms
memory: 6508kb

input:

100 1000 18
5 27 90 2 31 83 19 21 17 87 24 13 65 16 60 39 23 15
0 6 725253650
0 21 909741480
0 22 137866640
0 31 907614940
0 44 903058110
0 45 719823160
0 48 286033780
0 49 633535670
0 56 888583550
0 71 305844160
0 76 5886750
0 88 177417520
0 97 148595400
1 11 749832490
1 15 800257910
1 16 652415640...

output:

0
266648420
238222970
141413100
131847740
141778640
177424840
17211100
115642270
125996490
0
81259860
299761610
91540780
76978010
0
363898610
0
103853970
295318610
426787090
266878060
467169380
0
28422700
78414800
86429160
246151530
762983210
0
126708080
105969240
50516000
134315000
46604950
2682028...

result:

ok 100 lines

Subtask #8:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%