QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#443360#8581. 섬HuangHanSheng22 59ms13004kbC++171.7kb2024-06-15 15:16:322024-06-15 15:16:32

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 6
Accepted
time: 0ms
memory: 4072kb

input:

4
0 2

output:

1
4
0 2
1 2
3 4
4 0
2
4
0 1
2 3
3 0
4 2
1
3 2 0

result:

ok Correct

Test #2:

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

input:

3

output:

1
5
0 1
1 3
3 2
2 3
3 0
2
4
1 2
2 0
3 0
3 1
2
1 0 2
2 1 0

result:

wrong answer Wrong Answer, add_vertex called twice with same three vertices

Subtask #2:

score: 8
Accepted

Test #5:

score: 8
Accepted
time: 0ms
memory: 4080kb

input:

10
7 0
7 5
7 3
7 1
7 9
7 4
7 2

output:

1
10
7 0
7 5
7 3
7 1
7 9
7 4
7 2
6 7
8 10
10 9
2
10
0 1
1 2
2 3
3 4
4 5
5 6
7 8
8 9
9 0
10 7
1
8 7 9

result:

ok Correct

Test #6:

score: 8
Accepted
time: 1ms
memory: 3844kb

input:

1000
10 919
10 561
10 671
10 430
10 425
10 987
10 608
10 401
10 467
10 850
10 207
10 99
10 864
10 907
10 590
10 410
10 3
10 236
10 546
10 455
10 694
10 651
10 193
10 295
10 910
10 929
10 151
10 157
10 869
10 453
10 587
10 800
10 988
10 832
10 7
10 723
10 172
10 628
10 432
10 527
10 702
10 328
10 895...

output:

1
1000
10 919
10 561
10 671
10 430
10 425
10 987
10 608
10 401
10 467
10 850
10 207
10 99
10 864
10 907
10 590
10 410
10 3
10 236
10 546
10 455
10 694
10 651
10 193
10 295
10 910
10 929
10 151
10 157
10 869
10 453
10 587
10 800
10 988
10 832
10 7
10 723
10 172
10 628
10 432
10 527
10 702
10 328
10 8...

result:

ok Correct

Test #7:

score: 8
Accepted
time: 2ms
memory: 4000kb

input:

5000
3653 4458
3653 4383
3653 1303
3653 3306
3653 3218
3653 2614
3653 4321
3653 959
3653 2749
3653 3926
3653 3679
3653 2498
3653 163
3653 1980
3653 3542
3653 1300
3653 4388
3653 4971
3653 3012
3653 711
3653 103
3653 3179
3653 4304
3653 4387
3653 1526
3653 4202
3653 3989
3653 810
3653 4756
3653 4029
...

output:

1
5000
3653 4458
3653 4383
3653 1303
3653 3306
3653 3218
3653 2614
3653 4321
3653 959
3653 2749
3653 3926
3653 3679
3653 2498
3653 163
3653 1980
3653 3542
3653 1300
3653 4388
3653 4971
3653 3012
3653 711
3653 103
3653 3179
3653 4304
3653 4387
3653 1526
3653 4202
3653 3989
3653 810
3653 4756
3653 402...

result:

ok Correct

Test #8:

score: 8
Accepted
time: 52ms
memory: 12672kb

input:

199999
98281 193703
98281 79970
98281 92443
98281 1621
98281 144687
98281 143302
98281 15416
98281 9245
98281 127092
98281 21325
98281 149110
98281 119923
98281 53885
98281 25820
98281 29852
98281 34700
98281 120142
98281 185421
98281 84923
98281 66458
98281 192051
98281 44169
98281 114692
98281 105...

output:

1
199999
98281 193703
98281 79970
98281 92443
98281 1621
98281 144687
98281 143302
98281 15416
98281 9245
98281 127092
98281 21325
98281 149110
98281 119923
98281 53885
98281 25820
98281 29852
98281 34700
98281 120142
98281 185421
98281 84923
98281 66458
98281 192051
98281 44169
98281 114692
98281 1...

result:

ok Correct

Test #9:

score: 8
Accepted
time: 53ms
memory: 12900kb

input:

200000
175608 25000
175608 61359
175608 134288
175608 74838
175608 58154
175608 21892
175608 76830
175608 141171
175608 76397
175608 98232
175608 39276
175608 143602
175608 78284
175608 149754
175608 181632
175608 172252
175608 112871
175608 142010
175608 2821
175608 18165
175608 105580
175608 16460...

output:

1
200000
175608 25000
175608 61359
175608 134288
175608 74838
175608 58154
175608 21892
175608 76830
175608 141171
175608 76397
175608 98232
175608 39276
175608 143602
175608 78284
175608 149754
175608 181632
175608 172252
175608 112871
175608 142010
175608 2821
175608 18165
175608 105580
175608 164...

result:

ok Correct

Subtask #3:

score: 14
Accepted

Test #10:

score: 14
Accepted
time: 2ms
memory: 4268kb

input:

5000
4593 3389
4593 1610
4593 2357
4593 3323
4593 2037
4593 3667
4593 2737
4593 2642
4593 3981
4593 2700
4593 2134
4593 1719
4593 1444
4593 3729
4593 1371
4593 546
4593 1249
4593 646
4593 4221
4593 1542
4593 2314
4735 4952
4593 680
4593 2555
4593 2152
4593 740
4593 4056
4593 64
4593 3079
4593 3021
4...

output:

1
5000
4593 3389
4593 1610
4593 2357
4593 3323
4593 2037
4593 3667
4593 2737
4593 2642
4593 3981
4593 2700
4593 2134
4593 1719
4593 1444
4593 3729
4593 1371
4593 546
4593 1249
4593 646
4593 4221
4593 1542
4593 2314
4735 4952
4593 680
4593 2555
4593 2152
4593 740
4593 4056
4593 64
4593 3079
4593 3021...

result:

ok Correct

Test #11:

score: 14
Accepted
time: 2ms
memory: 4040kb

input:

5000
2039 2601
4753 3413
4753 4178
4753 3835
1179 2601
4753 3353
1382 2601
2310 2378
4753 3219
716 2601
1380 2601
4753 2757
4753 3561
4753 4236
4753 3289
1043 2601
4753 4154
4753 3226
144 2601
1791 2601
4753 3407
670 2601
685 2601
2217 2601
2310 2466
4753 3885
4753 3911
4753 3916
1999 2601
1057 2601...

output:

1
5000
2039 2601
4753 3413
4753 4178
4753 3835
1179 2601
4753 3353
1382 2601
2310 2378
4753 3219
716 2601
1380 2601
4753 2757
4753 3561
4753 4236
4753 3289
1043 2601
4753 4154
4753 3226
144 2601
1791 2601
4753 3407
670 2601
685 2601
2217 2601
2310 2466
4753 3885
4753 3911
4753 3916
1999 2601
1057 26...

result:

ok Correct

Test #12:

score: 14
Accepted
time: 2ms
memory: 4004kb

input:

5000
3821 2308
3611 2536
3156 2615
4013 879
3821 1271
3252 2615
4235 4538
4235 527
3611 2504
4021 879
3821 2074
3821 1764
3821 2264
4235 4702
3821 1358
3821 1419
3821 1031
3821 2008
4145 879
3821 1756
3821 947
4235 532
3989 879
2882 2615
3821 1502
4235 338
4232 879
3821 1280
3621 2310
4235 4997
4235...

output:

1
5000
3821 2308
3611 2536
3156 2615
4013 879
3821 1271
3252 2615
4235 4538
4235 527
3611 2504
4021 879
3821 2074
3821 1764
3821 2264
4235 4702
3821 1358
3821 1419
3821 1031
3821 2008
4145 879
3821 1756
3821 947
4235 532
3989 879
2882 2615
3821 1502
4235 338
4232 879
3821 1280
3621 2310
4235 4997
42...

result:

ok Correct

Test #13:

score: 14
Accepted
time: 2ms
memory: 4016kb

input:

5000
4291 1887
492 668
4405 1768
424 732
520 636
511 652
3249 2930
281 883
3798 2370
4497 1684
4314 1862
4589 1587
4128 2056
518 643
407 747
3666 2530
3911 2240
3656 2549
3804 2367
3221 2967
3340 2850
4644 1521
4696 1470
337 830
3200 3002
4958 1227
3690 2499
4052 2120
4584 1590
3454 2726
259 898
386...

output:

1
5000
4291 1887
492 668
4405 1768
424 732
520 636
511 652
3249 2930
281 883
3798 2370
4497 1684
4314 1862
4589 1587
4128 2056
518 643
407 747
3666 2530
3911 2240
3656 2549
3804 2367
3221 2967
3340 2850
4644 1521
4696 1470
337 830
3200 3002
4958 1227
3690 2499
4052 2120
4584 1590
3454 2726
259 898
3...

result:

ok Correct

Test #14:

score: 14
Accepted
time: 53ms
memory: 12772kb

input:

200000
118877 111067
118877 61677
118877 152911
118877 27918
118877 37129
118877 191189
134624 141257
118877 61841
118877 148131
118877 21099
118877 143149
118877 156253
118877 45282
118877 150038
118877 161995
118877 46438
118877 89345
118877 145634
118877 47579
118877 97199
118877 190418
131092 14...

output:

1
200000
118877 111067
118877 61677
118877 152911
118877 27918
118877 37129
118877 191189
134624 141257
118877 61841
118877 148131
118877 21099
118877 143149
118877 156253
118877 45282
118877 150038
118877 161995
118877 46438
118877 89345
118877 145634
118877 47579
118877 97199
118877 190418
131092 ...

result:

ok Correct

Test #15:

score: 14
Accepted
time: 51ms
memory: 12664kb

input:

200000
88390 168647
95628 158381
3699 168647
85785 168647
179225 168647
183266 168647
7344 168647
24236 168647
95628 160429
19276 168647
86328 168647
95628 129751
57331 168647
175821 168647
97793 101151
65768 168647
6743 168647
55840 168647
191522 168647
4698 168647
83621 168647
502 168647
199723 16...

output:

1
200000
88390 168647
95628 158381
3699 168647
85785 168647
179225 168647
183266 168647
7344 168647
24236 168647
95628 160429
19276 168647
86328 168647
95628 129751
57331 168647
175821 168647
97793 101151
65768 168647
6743 168647
55840 168647
191522 168647
4698 168647
83621 168647
502 168647
199723 ...

result:

ok Correct

Test #16:

score: 14
Accepted
time: 59ms
memory: 12672kb

input:

200000
161198 97004
210 53673
137624 117065
14207 37004
198957 54106
19932 32268
4156 50957
128715 122872
193255 61086
18355 32844
185270 77269
197683 56140
22524 29748
128713 123448
161233 97004
24961 28006
5903 48877
184255 78389
26779 27404
189943 66162
185159 77301
153135 104684
144760 110015
63...

output:

1
200000
161198 97004
210 53673
137624 117065
14207 37004
198957 54106
19932 32268
4156 50957
128715 122872
193255 61086
18355 32844
185270 77269
197683 56140
22524 29748
128713 123448
161233 97004
24961 28006
5903 48877
184255 78389
26779 27404
189943 66162
185159 77301
153135 104684
144760 110015
...

result:

ok Correct

Test #17:

score: 14
Accepted
time: 56ms
memory: 12716kb

input:

200000
9334 71537
150066 130781
12423 68345
185572 95318
166764 114046
190669 89957
141566 139287
178491 102412
150154 130684
156112 124634
189635 91076
199409 81350
149472 131358
169382 111462
162985 117788
153862 126958
193845 86858
154186 126603
36618 44266
12743 67994
14703 65983
18551 62202
131...

output:

1
200000
9334 71537
150066 130781
12423 68345
185572 95318
166764 114046
190669 89957
141566 139287
178491 102412
150154 130684
156112 124634
189635 91076
199409 81350
149472 131358
169382 111462
162985 117788
153862 126958
193845 86858
154186 126603
36618 44266
12743 67994
14703 65983
18551 62202
1...

result:

ok Correct

Test #18:

score: 14
Accepted
time: 54ms
memory: 13004kb

input:

200000
158793 27013
165764 20041
185032 774
136799 49007
122621 63185
155289 30517
113076 72729
127181 58625
116217 69589
104909 80897
154955 30851
184644 1162
130883 54923
94053 91753
165440 20366
132519 53287
129041 56764
127346 58459
109588 76218
181004 4801
111065 74740
145125 40680
153496 32309...

output:

1
200000
158793 27013
165764 20041
185032 774
136799 49007
122621 63185
155289 30517
113076 72729
127181 58625
116217 69589
104909 80897
154955 30851
184644 1162
130883 54923
94053 91753
165440 20366
132519 53287
129041 56764
127346 58459
109588 76218
181004 4801
111065 74740
145125 40680
153496 323...

result:

ok Correct

Subtask #4:

score: 0
Skipped

Dependency #1:

0%

Subtask #5:

score: 0
Skipped

Dependency #1:

0%