QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#443688#8581. 섬ZhangYiDe10.8 74ms34996kbC++201.9kb2024-06-15 16:18:072024-06-15 16:18:08

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 2.4
Acceptable Answer

Test #1:

score: 2.4
Acceptable Answer
time: 0ms
memory: 7892kb

input:

4
0 2

output:

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

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #2:

score: 6
Accepted
time: 2ms
memory: 7920kb

input:

3

output:

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

result:

ok Correct

Test #3:

score: 2.4
Acceptable Answer
time: 2ms
memory: 10248kb

input:

4
3 1

output:

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

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #4:

score: 2.4
Acceptable Answer
time: 1ms
memory: 7900kb

input:

5
1 4
1 3

output:

1
7
4 5
4 7
3 4
3 6
2 3
1 2
0 1
2
7
3 1
4 0
4 1
5 0
7 1
6 1
6 2
3
0 1 4
1 2 3
1 3 4

result:

points 0.40 Partially Correct: The number of operations is not minimized

Subtask #2:

score: 0
Runtime Error

Test #5:

score: 3.2
Acceptable Answer
time: 1ms
memory: 7908kb

input:

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

output:

1
17
9 11
9 17
8 9
7 8
7 10
7 12
7 13
7 14
7 15
7 16
6 7
5 6
4 5
3 4
2 3
1 2
0 1
2
17
7 0
7 1
7 2
7 3
7 4
7 5
9 0
11 0
17 7
17 8
10 0
12 1
13 2
14 3
15 4
16 5
16 6
8
0 1 7
0 7 9
1 2 7
2 3 7
3 4 7
4 5 7
5 6 7
7 8 9

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #6:

score: 3.2
Acceptable Answer
time: 0ms
memory: 14652kb

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
1997
999 1001
999 1997
998 999
998 1996
997 998
997 1995
996 997
996 1994
995 996
995 1993
994 995
994 1992
993 994
993 1991
992 993
992 1990
991 992
991 1989
990 991
990 1988
989 990
989 1987
988 989
988 1986
987 988
987 1985
986 987
986 1984
985 986
985 1983
984 985
984 1982
983 984
983 1981
982...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #7:

score: 3.2
Acceptable Answer
time: 71ms
memory: 33376kb

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
9997
4999 5001
4999 9997
4998 4999
4998 9996
4997 4998
4997 9995
4996 4997
4996 9994
4995 4996
4995 9993
4994 4995
4994 9992
4993 4994
4993 9991
4992 4993
4992 9990
4991 4992
4991 9989
4990 4991
4990 9988
4989 4990
4989 9987
4988 4989
4988 9986
4987 4988
4987 9985
4986 4987
4986 9984
4985 4986
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #8:

score: 0
Runtime Error

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:

Unauthorized output

result:


Subtask #3:

score: 0
Runtime Error

Test #10:

score: 5.6
Acceptable Answer
time: 67ms
memory: 33076kb

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
9997
4999 5001
4999 9640
4998 4999
4998 9639
4997 4998
4997 9638
4996 4997
4996 9637
4995 4996
4995 9636
4994 4995
4994 9635
4993 4994
4993 9634
4992 4993
4992 9633
4991 4992
4991 9632
4990 4991
4990 9631
4989 4990
4989 9630
4988 4989
4988 9629
4987 4988
4987 9628
4986 4987
4986 9627
4985 4986
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #11:

score: 5.6
Acceptable Answer
time: 72ms
memory: 32896kb

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
9997
4999 5001
4999 7847
4998 4999
4998 7846
4997 4998
4997 7845
4996 4997
4996 7844
4995 4996
4995 7843
4994 4995
4994 7842
4993 4994
4993 7841
4992 4993
4992 7840
4991 4992
4991 7839
4990 4991
4990 7838
4989 4990
4989 7837
4988 4989
4988 7836
4987 4988
4987 7835
4986 4987
4986 7834
4985 4986
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #12:

score: 5.6
Acceptable Answer
time: 71ms
memory: 33012kb

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
9997
4999 5001
4999 9997
4998 4999
4998 9996
4997 4998
4997 9995
4996 4997
4996 9994
4995 4996
4995 9993
4994 4995
4994 9992
4993 4994
4993 9991
4992 4993
4992 9990
4991 4992
4991 9989
4990 4991
4990 9988
4989 4990
4989 9987
4988 4989
4988 9986
4987 4988
4987 9985
4986 4987
4986 9984
4985 4986
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #13:

score: 5.6
Acceptable Answer
time: 74ms
memory: 33140kb

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
9997
4999 5001
4999 6194
4999 6202
4998 4999
4998 6201
4997 4998
4997 6200
4996 4997
4996 6199
4995 4996
4995 6198
4994 4995
4994 6197
4993 4994
4993 6196
4992 4993
4992 6195
4992 6203
4992 6205
4991 4992
4991 6204
4991 6207
4990 4991
4990 6206
4990 6210
4989 4990
4989 6209
4988 4989
4988 6208
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #14:

score: 0
Runtime Error

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:

Unauthorized output

result:


Subtask #4:

score: 8.4
Acceptable Answer

Dependency #1:

40%
Acceptable Answer

Test #19:

score: 8.4
Acceptable Answer
time: 2ms
memory: 7940kb

input:

10
0 2
6 0
4 2
0 5
6 9
6 8
0 4

output:

1
17
9 14
9 17
8 9
8 16
7 8
6 7
6 13
5 6
5 12
4 5
4 11
4 15
3 4
2 3
2 10
1 2
0 1
2
17
2 0
4 0
5 0
6 0
8 6
9 0
14 0
17 6
16 6
16 7
13 0
12 0
11 0
15 2
15 3
10 0
10 1
8
0 1 2
0 2 4
0 4 5
0 5 6
0 6 9
2 3 4
6 7 8
6 8 9

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #20:

score: 8.4
Acceptable Answer
time: 73ms
memory: 33060kb

input:

4999
3847 3851
3126 3142
1188 300
4756 4752
526 484
928 930
3288 3297
1628 1603
2089 2091
2619 2643
2471 2481
1709 1718
1222 1266
3245 3235
31 35
3009 3306
4609 4612
3366 3362
3715 3813
550 545
630 692
3581 3584
3715 3713
747 743
1191 1205
4289 4286
469 467
3879 3876
168 170
520 518
1890 1888
4515 4...

output:

1
9995
4998 5000
4998 5002
4998 5011
4998 9989
4998 9995
4997 4998
4997 9994
4996 4997
4995 4996
4995 9988
4995 9993
4994 4995
4993 4994
4993 9987
4993 9992
4992 4993
4991 4992
4991 9986
4991 9990
4991 9991
4990 4991
4989 4990
4988 4989
4988 9985
4987 4988
4986 4987
4986 5010
4986 9883
4986 9909
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #21:

score: 8.4
Acceptable Answer
time: 68ms
memory: 32956kb

input:

5000
2923 2920
2307 2310
4952 4949
4327 4246
2332 2323
3794 3798
2344 2346
2927 2924
4437 4439
4529 4531
2634 2630
1847 1852
542 538
4607 4599
1011 1013
4696 4694
287 284
814 782
524 527
1362 1359
2558 2560
1095 1097
1432 1485
158 161
2395 2401
4738 4755
1481 1483
1044 1041
644 642
1122 1116
4341 43...

output:

1
9997
4999 5000
4999 5002
4999 5007
4999 5012
4999 5024
4999 5038
4999 9992
4999 9994
4999 9996
4999 9997
4998 4999
4997 4998
4997 9995
4996 4997
4995 4996
4995 9993
4994 4995
4993 4994
4992 4993
4992 5037
4992 5065
4992 9991
4991 4992
4991 9990
4990 4991
4989 4990
4989 5064
4989 9872
4989 9878
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #22:

score: 8.4
Acceptable Answer
time: 71ms
memory: 33096kb

input:

4999
149 145
4651 4684
3354 3392
3453 3457
4314 4305
1036 1039
4915 4918
4229 4223
4554 4558
4176 4179
376 372
509 525
1057 1051
3361 3363
2724 2713
664 658
1608 1619
80 78
2040 2042
550 555
2126 2131
169 171
1590 1592
4593 4601
409 411
4863 4860
1306 1304
2177 2175
4770 4787
4981 4984
1225 1075
385...

output:

1
9995
4998 5002
4997 4998
4997 5001
4997 9994
4997 9995
4996 4997
4995 4996
4994 4995
4994 5000
4994 5007
4993 4994
4993 5006
4993 9982
4993 9992
4993 9993
4992 4993
4991 4992
4990 4991
4990 9981
4990 9989
4990 9990
4990 9991
4989 4990
4988 4989
4987 4988
4986 4987
4986 9980
4986 9986
4986 9988
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #23:

score: 8.4
Acceptable Answer
time: 66ms
memory: 32956kb

input:

5000
2054 2060
853 855
4655 4664
3349 3343
1871 1867
1136 1134
521 525
1263 1261
1885 1874
3482 3479
1857 1844
2878 2873
1588 1590
4648 4643
1737 1735
1414 1410
668 665
4673 4691
2404 2402
1198 1200
2559 2554
2287 2291
3284 3277
775 773
2763 2761
1550 1563
277 279
3249 3255
2689 2678
1167 1165
2886 ...

output:

1
9997
4999 5005
4998 4999
4998 5004
4998 9985
4998 9997
4997 4998
4996 4997
4996 9984
4996 9987
4996 9991
4996 9995
4996 9996
4995 4996
4994 4995
4993 4994
4993 9990
4993 9994
4992 4993
4991 4992
4991 9989
4991 9993
4990 4991
4989 4990
4989 9988
4989 9992
4988 4989
4987 4988
4986 4987
4986 9986
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #24:

score: 8.4
Acceptable Answer
time: 74ms
memory: 34996kb

input:

5000
866 197
4394 4396
156 158
1432 2482
2027 2242
1097 4080
4028 4030
4213 1069
824 408
1199 3552
270 272
923 4965
3383 3385
79 81
1438 2456
781 596
1587 2335
1381 2698
1206 3524
2888 1335
3134 1290
1968 1970
2665 2667
143 882
2633 2635
3957 3959
1163 3790
3596 3598
644 774
2318 1643
1670 1672
1447...

output:

1
9997
4999 5000
4999 5003
4999 5922
4999 9997
4998 4999
4997 4998
4997 5921
4997 9996
4996 4997
4995 4996
4995 5920
4995 9995
4994 4995
4993 4994
4993 5919
4992 4993
4992 5918
4992 9994
4991 4992
4990 4991
4990 5917
4990 9993
4989 4990
4988 4989
4988 5916
4988 5923
4988 5924
4988 5925
4988 5926
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Test #25:

score: 8.4
Acceptable Answer
time: 73ms
memory: 32960kb

input:

5000
719 761
3798 3828
4884 4895
3424 3426
3317 3319
1016 642
2578 2636
1536 1528
3047 3045
74 93
4626 4629
366 371
3317 3315
4741 4746
4826 4831
3207 3205
743 745
2151 2172
4022 503
4095 4097
1421 1414
4580 4578
3682 521
814 833
4300 4298
2974 2994
4194 4215
1477 1474
3507 3509
1084 1102
4884 4894
...

output:

1
9997
4999 5002
4998 4999
4998 5001
4997 4998
4997 5000
4997 5004
4997 5007
4997 9997
4996 4997
4995 4996
4995 5006
4995 5478
4994 4995
4994 5477
4993 4994
4993 5476
4993 5486
4993 9958
4993 9959
4993 9965
4993 9973
4993 9982
4992 4993
4992 9981
4991 4992
4991 9980
4990 4991
4990 9979
4989 4990
498...

result:

points 0.40 Partially Correct: The number of operations is not minimized

Subtask #5:

score: 0
Skipped

Dependency #1:

40%
Acceptable Answer

Dependency #2:

0%