QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#799976#68. Designated CitiesGuanYunchang13 134ms34540kbC++204.2kb2024-12-05 19:54:222024-12-05 19:54:22

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 1ms
memory: 7700kb

input:

2
1 2 781089648 283888890
2
1
2

output:

283888890
0

result:

ok 2 lines

Test #2:

score: 6
Accepted
time: 50ms
memory: 10016kb

input:

16
6 10 160848335 124052868
7 1 241203243 110601447
14 6 290972019 163072373
11 15 938517011 154373610
12 1 138651641 741445657
7 8 60218933 280830068
16 15 203079209 633547400
11 7 199606763 919756826
14 12 266702877 916493997
15 13 905937802 481991969
2 10 234605456 722866810
3 5 366455156 4966982...

output:

6311369523
2092762454
966156735
60218933
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #3:

score: 6
Accepted
time: 57ms
memory: 9732kb

input:

16
3 4 204022014 914663555
9 10 11007340 458844696
2 7 605164817 895349276
14 11 434326485 550918606
14 7 712866927 489761842
6 1 356406033 534499656
16 8 942553720 855217399
5 10 865707145 586883622
6 13 108330979 234031340
15 8 769531307 948036095
3 16 358448538 363203546
5 2 419315988 76297418
12...

output:

7413430560
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #4:

score: 6
Accepted
time: 43ms
memory: 9816kb

input:

16
4 5 1000000000 1000000000
10 5 1000000000 1000000000
8 5 1000000000 1000000000
11 13 999999646 999999646
15 16 999998089 999998089
7 5 929 929
14 7 898 898
16 9 159 159
6 12 603 603
9 2 999997930 999997930
3 6 999999242 999999242
5 12 155 155
16 14 84 84
14 1 999998173 999998173
12 13 199 199
16
...

output:

7999996107
5999996107
4999996107
3999996107
2999996107
1999996262
999998089
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #5:

score: 6
Accepted
time: 47ms
memory: 9760kb

input:

16
11 14 14368758 85219578
14 16 643747916 252121045
9 14 727413140 523990811
2 15 521253466 147320442
7 13 866289084 908489699
12 6 320730514 344516785
10 9 516379646 496493179
15 8 776569142 612383860
8 3 734861011 149748310
1 5 815040382 677607019
2 12 50609677 301797586
5 14 716517909 635543949
...

output:

7189308203
2211904770
1191420780
456559769
85219578
0
0
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #6:

score: 6
Accepted
time: 47ms
memory: 10016kb

input:

16
13 9 720744296 759388601
13 5 458441737 833011123
1 16 698474192 71086181
3 8 861918984 114516836
15 10 278084894 710666762
4 8 287405359 250250967
1 6 741642264 735381406
2 15 792787000 825787518
6 12 261754526 230466084
13 7 938274540 78969406
12 10 202958723 294264294
12 4 98252269 169605483
3...

output:

5844026168
2690903861
1848894892
1128150596
458441737
0
0
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #7:

score: 6
Accepted
time: 52ms
memory: 7744kb

input:

16
1 7 765638022 679756044
10 6 759069284 453967337
5 7 726239258 178402766
4 15 242761737 318885919
1 15 723511609 915383888
9 8 553064704 380886548
12 13 822971769 782770910
6 8 525975561 603298402
11 6 724594701 141189620
13 2 8408668 628943880
12 10 299406310 356329223
5 14 795305423 974800675
8...

output:

7154270560
522076168
141189620
0
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #8:

score: 6
Accepted
time: 39ms
memory: 9784kb

input:

16
6 2 396591 824425
14 1 121765 805092
9 10 386895 457376
3 15 20413 247942
8 3 426212 748706
12 11 318841 270569
2 16 925055746 604726712
12 1 359775 784231
14 5 516354 617685
2 9 970316 896797
2 7 943776860 978585272
14 9 712667 948012
8 9 566593 580631
4 12 761761 974298
13 2 136216 831818
16
1
...

output:

1556207783
7704211
3905589
2878333
2046515
1222090
705736
318841
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #9:

score: 6
Accepted
time: 39ms
memory: 7740kb

input:

16
2 8 119073534 555736925
5 2 866791517 685527555
11 14 180535517 448907590
2 16 393190702 164818863
6 9 298521139 301021930
2 1 808238767 844723287
4 1 221776781 268737189
10 2 551486708 14310879
2 15 363573262 106859347
2 9 622353716 714488454
13 2 908780203 288479297
13 7 897814090 253679879
2 3...

output:

6418370219
4638508078
3561532122
2638156476
1952628921
1339055967
890148377
496957675
133384413
14310879
0
0
0
0
0
0

result:

ok 16 lines

Test #10:

score: 6
Accepted
time: 58ms
memory: 9784kb

input:

16
3 12 901164666 987344195
7 11 777270351 297899178
6 14 441322434 685318792
3 4 894100390 768738682
6 10 308476613 227952988
12 2 398335684 800091780
15 9 683557377 818349714
2 8 55495903 851348261
5 10 842245631 650602672
11 16 169505872 655780963
9 8 978986177 766795908
5 13 17521706 829965580
1...

output:

8007192643
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 16 lines

Test #11:

score: 6
Accepted
time: 35ms
memory: 9740kb

input:

16
12 15 517822965 25354413
11 15 338190311 652436812
7 15 127729186 939448905
15 13 696913706 181993967
1 15 498822103 388824680
9 15 20787116 535387165
15 16 202795662 159091154
15 4 474628657 160994640
15 14 997130096 858493491
15 3 341451768 47792481
15 5 757815934 174503003
8 15 341732022 77854...

output:

7709225932
6581334361
5641885456
4863341388
4105525454
3408611748
2756174936
2220787771
1746159114
1337789248
948964568
569601843
228150075
25354413
0
0

result:

ok 16 lines

Subtask #2:

score: 7
Accepted

Test #12:

score: 7
Accepted
time: 2ms
memory: 10020kb

input:

2
1 2 683402985 526289818
1
1

output:

526289818

result:

ok single line: '526289818'

Test #13:

score: 7
Accepted
time: 106ms
memory: 26384kb

input:

200000
30498 170310 456566691 649436035
88553 73637 443596936 376869783
157116 8270 670934073 119072463
24742 48732 237943289 398782798
118620 71333 841086509 861755957
91523 118037 345609124 755508586
182978 92078 999023640 247489369
57480 73002 550952716 31090859
85037 151494 615937607 181113974
8...

output:

100090261531134

result:

ok single line: '100090261531134'

Test #14:

score: 7
Accepted
time: 134ms
memory: 34224kb

input:

200000
62380 190510 660465798 980286669
73494 59167 399860395 883378826
78917 156327 617261054 354160980
25845 163881 79154538 824380095
97426 144191 891448990 704743172
73271 43633 837335594 922276690
193758 169742 364918510 151494521
62996 52874 828453581 144363372
199529 178275 804482094 11831376...

output:

100066669866017

result:

ok single line: '100066669866017'

Test #15:

score: 7
Accepted
time: 98ms
memory: 26824kb

input:

200000
183258 143073 982 982
31786 177754 580 580
26332 6792 85 85
6390 70312 847 847
193105 75442 735 735
172433 196956 999926081 999926081
114861 33150 991 991
108634 161301 206 206
122529 105025 426 426
21388 86201 300 300
170711 87982 999923960 999923960
120595 43763 921 921
99462 120013 737 737...

output:

81103004367189

result:

ok single line: '81103004367189'

Test #16:

score: 7
Accepted
time: 100ms
memory: 26060kb

input:

200000
1539 92316 48323903 202410877
35890 69243 415172828 308900141
190963 50985 755719943 159735479
72146 159885 72946173 622268672
127505 64851 485107488 958218451
43378 89830 417162770 911217276
158176 69012 355971119 826228739
146386 106745 99361947 614603091
190012 95465 758111489 876554997
40...

output:

99944714663527

result:

ok single line: '99944714663527'

Test #17:

score: 7
Accepted
time: 111ms
memory: 26504kb

input:

200000
13693 159720 471504101 851110321
134244 80255 908560356 681906336
52579 127713 744119846 470734684
84038 32991 525544642 941494197
118155 105510 885724375 303139090
24258 176279 806826007 371683303
46557 54039 791816892 13705486
119090 160877 781290926 259135450
21899 55292 338745705 70209065...

output:

100142110488065

result:

ok single line: '100142110488065'

Test #18:

score: 7
Accepted
time: 93ms
memory: 26640kb

input:

200000
51485 158642 829759545 555246994
46408 182427 680884310 952048393
181386 51981 774364250 510078376
158642 137221 958595981 417456152
158642 13560 525026357 666355475
158642 119626 653370640 66503632
23721 100035 260540702 507629954
180546 101304 430322145 698388876
62412 158642 536391228 6818...

output:

100029161376725

result:

ok single line: '100029161376725'

Test #19:

score: 7
Accepted
time: 127ms
memory: 34540kb

input:

200000
172976 108672 288769649 485088836
159642 46318 971501113 486464598
120751 69878 169239703 173145059
44498 138117 820693607 695329677
158520 63527 366383754 437019528
19626 64856 939531671 635492288
21084 66469 694278429 909732840
30440 161053 573714265 203831805
160668 89739 513226897 3644949...

output:

99756547102864

result:

ok single line: '99756547102864'

Test #20:

score: 7
Accepted
time: 77ms
memory: 24152kb

input:

200000
154441 4651 747796649 453770199
137511 154441 46174763 669025918
154441 46408 501310306 365029626
154441 70897 637262505 711161748
149885 154441 906469650 910775313
56604 154441 120489234 529690198
154441 128437 857569560 602188933
154441 12895 528165172 22359068
177797 154441 947733025 70024...

output:

100044587345734

result:

ok single line: '100044587345734'

Subtask #3:

score: 0
Wrong Answer

Test #21:

score: 9
Accepted
time: 0ms
memory: 7692kb

input:

2
2 1 92722556 873785501
1
2

output:

0

result:

ok single line: '0'

Test #22:

score: 0
Wrong Answer
time: 92ms
memory: 22260kb

input:

200000
99982 83075 709942852 92942003
168325 12929 879930937 637190556
85628 123672 784369088 731448156
34917 117619 569166498 663184347
92257 112058 369526210 824568522
32464 109884 258245678 691717157
129594 115097 627894556 937225369
54700 187473 81636213 510866047
52020 197198 577461848 47343465...

output:


result:

wrong answer 1st lines differ - expected: '99980874607500', found: ''

Subtask #4:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #30:

score: 17
Accepted
time: 2ms
memory: 10008kb

input:

2
1 2 781089648 283888890
2
1
2

output:

283888890
0

result:

ok 2 lines

Test #31:

score: 0
Wrong Answer
time: 2ms
memory: 7872kb

input:

2000
668 1839 972599655 457068476
133 11 666838083 851019038
1194 1287 133765716 574032589
107 441 176385032 470971775
131 1040 243142030 758968684
377 1963 707275419 115749455
1599 1801 764665175 425876028
169 656 229430355 330349441
128 1885 47324906 989597389
1366 419 253887722 295321149
1520 605...

output:


result:

wrong answer 1st lines differ - expected: '1007815336129', found: ''

Subtask #5:

score: 0
Wrong Answer

Test #45:

score: 17
Accepted
time: 1ms
memory: 7736kb

input:

2
1 2 543195986 144983073
1
1

output:

144983073

result:

ok single line: '144983073'

Test #46:

score: 0
Wrong Answer
time: 95ms
memory: 21976kb

input:

200000
73974 46059 151001152 42729969
112523 175399 580450366 914798605
65645 46109 848220487 698683602
63048 106502 596698349 144038980
98888 11174 948423025 972032422
115490 95315 788936645 231068151
5185 187319 690370465 616111588
10331 161483 606127487 195799307
133831 170948 694137989 490575964...

output:


result:

wrong answer 1st lines differ - expected: '5449143475272', found: ''

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%