QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#457977#7278. Brought Down the Grading Server?egypt_ioi2024_05#35 252ms50760kbC++172.6kb2024-06-29 15:05:492024-06-29 15:05:50

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

3 2 3
1 2
2 3
2 3

output:

1 2
3 2
2 3

result:

ok 

Test #2:

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

input:

20 2 20
18 2
12 5
20 9
4 2
17 4
7 15
9 2
5 5
13 15
19 5
3 5
10 19
8 5
7 10
9 11
3 16
7 18
9 5
3 8
18 4

output:

18 2
5 12
9 20
2 4
4 17
7 15
2 9
5 5
15 13
5 19
5 3
19 10
8 5
10 7
11 9
3 16
7 18
9 5
3 8
4 18

result:

ok 

Test #3:

score: 10
Accepted
time: 3ms
memory: 14788kb

input:

20 2 12
12 11
1 9
12 12
3 4
3 9
8 3
8 11
10 9
4 3
6 7
11 6
11 3
7 10
12 10
11 10
11 11
11 2
1 12
6 12
2 7

output:

11 12
1 9
12 12
4 3
9 3
3 8
8 11
10 9
3 4
7 6
6 11
11 3
7 10
12 10
10 11
11 11
11 2
12 1
6 12
2 7

result:

ok 

Test #4:

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

input:

20 2 8
7 7
7 8
6 4
7 4
6 2
4 6
1 3
2 3
8 3
6 7
1 5
6 3
2 5
1 4
2 2
6 2
6 3
2 5
5 3
3 3

output:

7 7
8 7
6 4
7 4
6 2
4 6
1 3
3 2
3 8
6 7
1 5
6 3
5 2
4 1
2 2
2 6
3 6
2 5
5 3
3 3

result:

ok 

Test #5:

score: 10
Accepted
time: 4ms
memory: 14892kb

input:

12 2 20
13 1
4 14
14 13
17 1
8 15
14 5
3 7
20 6
1 9
19 11
6 20
11 13

output:

13 1
4 14
14 13
1 17
8 15
14 5
3 7
20 6
1 9
11 19
6 20
13 11

result:

ok 

Test #6:

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

input:

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

output:

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

result:

ok 

Test #7:

score: 10
Accepted
time: 3ms
memory: 13452kb

input:

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

output:

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

result:

ok 

Subtask #2:

score: 15
Accepted

Test #8:

score: 15
Accepted
time: 187ms
memory: 42156kb

input:

100000 2 100000
70318 14894
32116 90327
63866 29061
53683 63612
70370 78264
42647 76881
39251 31741
61186 66491
57686 65819
53278 59145
71962 26052
81040 55279
50859 51310
46800 24546
85013 91165
61530 21890
84003 29099
33573 86182
49212 10639
91851 97312
57682 14067
5243 69674
99007 62508
26290 555...

output:

14894 70318
32116 90327
63866 29061
53683 63612
78264 70370
76881 42647
31741 39251
61186 66491
57686 65819
53278 59145
26052 71962
55279 81040
50859 51310
24546 46800
85013 91165
21890 61530
29099 84003
33573 86182
49212 10639
97312 91851
14067 57682
69674 5243
99007 62508
26290 55524
43794 15519
5...

result:

ok 

Test #9:

score: 15
Accepted
time: 69ms
memory: 42220kb

input:

100000 2 100000
2 1
3 2
4 3
5 4
6 5
7 6
8 7
9 8
10 9
11 10
12 11
13 12
14 13
15 14
16 15
17 16
18 17
19 18
20 19
21 20
22 21
23 22
24 23
25 24
26 25
27 26
28 27
29 28
30 29
31 30
32 31
33 32
34 33
35 34
36 35
37 36
38 37
39 38
40 39
41 40
42 41
43 42
44 43
45 44
46 45
47 46
48 47
49 48
50 49
51 50
5...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok 

Test #10:

score: 15
Accepted
time: 71ms
memory: 42116kb

input:

99555 2 99555
2 1
3 2
3 4
4 5
6 5
7 6
7 8
8 9
10 9
11 10
11 12
12 13
14 13
15 14
15 16
16 17
18 17
19 18
19 20
20 21
22 21
23 22
23 24
24 25
26 25
27 26
27 28
28 29
30 29
31 30
31 32
32 33
34 33
35 34
35 36
36 37
38 37
39 38
39 40
40 41
42 41
43 42
43 44
44 45
46 45
47 46
47 48
48 49
50 49
51 50
51 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok 

Test #11:

score: 15
Accepted
time: 163ms
memory: 41968kb

input:

98045 2 95001
27085 59126
75021 23663
67175 78883
3919 90698
20718 67504
49374 44011
1660 3236
71971 79270
24502 90540
54202 9732
14395 88659
56600 52635
21912 17986
92420 56526
40254 3472
64330 20431
9381 56003
57750 45529
45230 9388
83797 53437
75562 47526
63126 45219
71020 87437
50298 2016
21982 ...

output:

27085 59126
75021 23663
78883 67175
3919 90698
20718 67504
44011 49374
3236 1660
79270 71971
24502 90540
9732 54202
14395 88659
56600 52635
17986 21912
92420 56526
3472 40254
20431 64330
56003 9381
45529 57750
9388 45230
53437 83797
47526 75562
63126 45219
87437 71020
2016 50298
21982 43667
37443 85...

result:

ok 

Test #12:

score: 15
Accepted
time: 159ms
memory: 38972kb

input:

89868 2 20001
16598 13223
18759 19981
2642 8681
4102 18080
11473 16749
690 15290
17900 16229
10684 17481
6328 12171
9417 1150
7185 5689
10346 17102
17958 9727
2117 13756
10955 13157
245 2840
5257 5337
16622 6429
17516 10772
13007 19349
11359 2821
14341 8897
3974 2482
16241 17966
18146 15458
3345 158...

output:

13223 16598
18759 19981
8681 2642
18080 4102
11473 16749
690 15290
17900 16229
10684 17481
6328 12171
1150 9417
5689 7185
17102 10346
17958 9727
2117 13756
10955 13157
2840 245
5337 5257
16622 6429
17516 10772
19349 13007
11359 2821
8897 14341
2482 3974
17966 16241
18146 15458
15868 3345
18630 14507...

result:

ok 

Test #13:

score: 15
Accepted
time: 18ms
memory: 14616kb

input:

99006 2 11
7 2
3 10
10 8
1 8
5 2
3 6
6 3
5 3
6 8
7 7
4 7
1 3
7 6
10 5
6 4
9 9
8 4
2 9
6 1
10 7
10 1
9 7
6 9
6 9
3 10
10 10
6 2
7 7
6 5
3 8
4 4
5 2
5 8
8 2
10 9
8 3
7 4
2 2
8 9
8 10
8 9
2 1
1 5
4 7
4 9
6 9
8 10
2 4
6 3
4 1
2 10
3 5
10 7
7 1
4 10
6 6
1 4
4 8
10 9
3 9
5 5
6 1
9 2
2 7
9 5
9 8
1 3
5 6
7 ...

output:

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

result:

ok 

Test #14:

score: 15
Accepted
time: 72ms
memory: 25508kb

input:

100000 2 100000
53479 25002
53479 63606
53479 40735
53479 83340
53479 40775
53479 11458
53479 8684
53479 60405
45116 53479
67722 53479
26014 53479
87860 53479
55147 53479
53479 22726
53479 67769
53479 129
14600 53479
53479 21514
53479 32164
60088 53479
53479 25415
70946 53479
53479 27091
33386 53479...

output:

53479 25002
63606 53479
53479 40735
83340 53479
53479 40775
53479 11458
53479 8684
60405 53479
53479 45116
67722 53479
53479 26014
87860 53479
55147 53479
53479 22726
67769 53479
53479 129
53479 14600
53479 21514
53479 32164
60088 53479
53479 25415
70946 53479
53479 27091
53479 33386
53479 6198
5347...

result:

ok 

Test #15:

score: 15
Accepted
time: 185ms
memory: 42068kb

input:

100000 2 90000
8483 66963
63660 79073
41795 20397
1296 84311
3690 21178
21052 31611
51423 14323
34208 82468
83835 2785
50594 28274
59957 10993
34259 64334
89407 73934
14947 61083
53201 89472
61243 33351
76632 58718
67464 85318
54224 45096
84552 76529
44253 30697
43669 3108
26489 64691
79840 85776
76...

output:

8483 66963
63660 79073
41795 20397
1296 84311
3690 21178
21052 31611
51423 14323
34208 82468
2785 83835
28274 50594
10993 59957
34259 64334
89407 73934
61083 14947
89472 53201
61243 33351
58718 76632
85318 67464
54224 45096
84552 76529
30697 44253
43669 3108
64691 26489
85776 79840
10620 7691
17307 ...

result:

ok 

Test #16:

score: 15
Accepted
time: 172ms
memory: 41612kb

input:

99458 2 99458
80944 83824
25208 26621
57146 28836
43915 18169
59242 47842
34224 78881
38791 20722
89723 91046
72800 40306
92681 94906
41151 7263
76035 13332
93928 38800
97168 86055
44186 73623
68071 7391
20692 72265
44111 42596
36037 77687
64592 836
43568 35187
34861 88539
37477 22111
85787 98028
73...

output:

80944 83824
26621 25208
57146 28836
43915 18169
59242 47842
78881 34224
38791 20722
89723 91046
40306 72800
92681 94906
41151 7263
13332 76035
93928 38800
86055 97168
44186 73623
68071 7391
20692 72265
44111 42596
77687 36037
836 64592
35187 43568
34861 88539
37477 22111
85787 98028
73684 41994
5614...

result:

ok 

Test #17:

score: 15
Accepted
time: 190ms
memory: 42052kb

input:

100000 2 100000
91980 92592
12359 10704
35873 56718
28601 20301
78422 55548
74736 59974
81664 29025
55916 70432
47381 34185
31764 56168
33997 30947
70076 9029
52532 67057
79680 99273
54410 56704
45238 71652
12615 6894
66478 78041
40520 5451
58133 5950
89237 70551
36028 97551
83553 90630
15211 33690
...

output:

92592 91980
12359 10704
35873 56718
28601 20301
55548 78422
74736 59974
29025 81664
70432 55916
47381 34185
56168 31764
33997 30947
70076 9029
67057 52532
99273 79680
56704 54410
45238 71652
6894 12615
66478 78041
5451 40520
5950 58133
70551 89237
97551 36028
90630 83553
33690 15211
6670 74551
42121...

result:

ok 

Test #18:

score: 15
Accepted
time: 195ms
memory: 42028kb

input:

99555 2 99555
79301 40457
40457 80634
49074 21580
92701 14354
44540 70461
47132 47637
84954 27979
87556 60683
22633 43063
49914 63643
4494 3571
88758 53632
17055 50019
49334 79039
67659 50111
17945 48061
84596 60323
14629 72033
77184 30069
64209 36217
49947 35279
45866 44707
58146 58484
1393 53385
4...

output:

40457 79301
80634 40457
21580 49074
14354 92701
70461 44540
47637 47132
27979 84954
60683 87556
22633 43063
49914 63643
3571 4494
88758 53632
50019 17055
79039 49334
50111 67659
48061 17945
84596 60323
14629 72033
30069 77184
36217 64209
35279 49947
45866 44707
58146 58484
53385 1393
48048 49825
568...

result:

ok 

Subtask #3:

score: 5
Accepted

Dependency #2:

100%
Accepted

Test #19:

score: 5
Accepted
time: 230ms
memory: 42152kb

input:

100000 2 100000
70318 14894
32116 90327
63866 29061
53683 63612
70370 78264
42647 76881
39251 31741
61186 66491
57686 65819
53278 59145
71962 26052
81040 55279
50859 51310
46800 24546
85013 91165
61530 21890
84003 29099
33573 86182
49212 10639
91851 97312
57682 14067
5243 69674
99007 62508
26290 555...

output:

14894 70318
32116 90327
63866 29061
53683 63612
78264 70370
76881 42647
31741 39251
61186 66491
57686 65819
53278 59145
26052 71962
55279 81040
50859 51310
24546 46800
85013 91165
21890 61530
29099 84003
33573 86182
49212 10639
97312 91851
14067 57682
69674 5243
99007 62508
26290 55524
43794 15519
5...

result:

ok 

Test #20:

score: 5
Accepted
time: 70ms
memory: 41940kb

input:

100000 2 100000
2 1
3 2
4 3
5 4
6 5
7 6
8 7
9 8
10 9
11 10
12 11
13 12
14 13
15 14
16 15
17 16
18 17
19 18
20 19
21 20
22 21
23 22
24 23
25 24
26 25
27 26
28 27
29 28
30 29
31 30
32 31
33 32
34 33
35 34
36 35
37 36
38 37
39 38
40 39
41 40
42 41
43 42
44 43
45 44
46 45
47 46
48 47
49 48
50 49
51 50
5...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok 

Test #21:

score: 5
Accepted
time: 66ms
memory: 42108kb

input:

99555 2 99555
2 1
3 2
3 4
4 5
6 5
7 6
7 8
8 9
10 9
11 10
11 12
12 13
14 13
15 14
15 16
16 17
18 17
19 18
19 20
20 21
22 21
23 22
23 24
24 25
26 25
27 26
27 28
28 29
30 29
31 30
31 32
32 33
34 33
35 34
35 36
36 37
38 37
39 38
39 40
40 41
42 41
43 42
43 44
44 45
46 45
47 46
47 48
48 49
50 49
51 50
51 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok 

Test #22:

score: 5
Accepted
time: 252ms
memory: 50760kb

input:

100000 2 100000
47641 2360
32311 27712
96580 5576
74432 69601
5497 90724
61408 72215
86499 23207
43465 29593
49534 20236
83680 95890
35990 98338
39222 14744
65183 72902
76527 73553
40936 27695
96356 68239
66861 20211
59817 9499
65669 53200
74170 53434
44590 79062
45816 66321
37251 32926
26433 58003
...

output:

47641 2360
32311 27712
5576 96580
69601 74432
90724 5497
61408 72215
23207 86499
29593 43465
20236 49534
83680 95890
35990 98338
39222 14744
65183 72902
73553 76527
40936 27695
96356 68239
20211 66861
9499 59817
65669 53200
53434 74170
79062 44590
45816 66321
37251 32926
26433 58003
72346 23461
7234...

result:

ok 

Test #23:

score: 5
Accepted
time: 24ms
memory: 15940kb

input:

99000 2 100
50 76
35 53
70 8
48 61
12 98
81 72
62 87
10 6
61 83
63 42
66 10
7 46
35 66
47 52
30 60
70 33
27 16
32 82
8 28
85 83
95 21
63 84
47 57
89 86
73 69
52 60
72 78
78 61
61 36
3 73
31 50
47 20
69 28
74 34
100 79
99 56
51 43
86 15
38 28
3 94
63 76
19 56
31 90
79 97
3 23
14 44
78 63
99 85
14 50
...

output:

76 50
53 35
70 8
61 48
98 12
81 72
87 62
10 6
83 61
63 42
66 10
46 7
66 35
52 47
60 30
70 33
27 16
82 32
28 8
85 83
95 21
84 63
57 47
89 86
73 69
60 52
78 72
78 61
61 36
73 3
50 31
47 20
69 28
74 34
100 79
99 56
51 43
86 15
38 28
94 3
76 63
56 19
90 31
97 79
23 3
44 14
78 63
99 85
50 14
90 4
87 41
9...

result:

ok 

Test #24:

score: 5
Accepted
time: 195ms
memory: 44596kb

input:

99000 2 40000
13317 12923
15159 469
15225 23585
11180 1824
7967 39735
13852 38886
33137 27292
21697 28740
9887 13116
25732 33405
9156 39496
24569 31286
12900 32138
2345 1862
18626 2824
19382 25016
11342 18721
10236 296
37626 8228
30418 10247
29998 33581
21676 4543
39650 14279
8842 1957
15206 22521
1...

output:

13317 12923
15159 469
15225 23585
11180 1824
39735 7967
38886 13852
33137 27292
28740 21697
9887 13116
33405 25732
9156 39496
31286 24569
32138 12900
2345 1862
18626 2824
19382 25016
18721 11342
10236 296
37626 8228
10247 30418
29998 33581
21676 4543
39650 14279
8842 1957
15206 22521
34238 10717
175...

result:

ok 

Test #25:

score: 5
Accepted
time: 151ms
memory: 42020kb

input:

98045 2 95001
27085 59126
75021 23663
67175 78883
3919 90698
20718 67504
49374 44011
1660 3236
71971 79270
24502 90540
54202 9732
14395 88659
56600 52635
21912 17986
92420 56526
40254 3472
64330 20431
9381 56003
57750 45529
45230 9388
83797 53437
75562 47526
63126 45219
71020 87437
50298 2016
21982 ...

output:

27085 59126
75021 23663
78883 67175
3919 90698
20718 67504
44011 49374
3236 1660
79270 71971
24502 90540
9732 54202
14395 88659
56600 52635
17986 21912
92420 56526
3472 40254
20431 64330
56003 9381
45529 57750
9388 45230
53437 83797
47526 75562
63126 45219
87437 71020
2016 50298
21982 43667
37443 85...

result:

ok 

Test #26:

score: 5
Accepted
time: 163ms
memory: 39448kb

input:

89868 2 20001
16598 13223
18759 19981
2642 8681
4102 18080
11473 16749
690 15290
17900 16229
10684 17481
6328 12171
9417 1150
7185 5689
10346 17102
17958 9727
2117 13756
10955 13157
245 2840
5257 5337
16622 6429
17516 10772
13007 19349
11359 2821
14341 8897
3974 2482
16241 17966
18146 15458
3345 158...

output:

13223 16598
18759 19981
8681 2642
18080 4102
11473 16749
690 15290
17900 16229
10684 17481
6328 12171
1150 9417
5689 7185
17102 10346
17958 9727
2117 13756
10955 13157
2840 245
5337 5257
16622 6429
17516 10772
19349 13007
11359 2821
8897 14341
2482 3974
17966 16241
18146 15458
15868 3345
18630 14507...

result:

ok 

Test #27:

score: 5
Accepted
time: 18ms
memory: 14560kb

input:

99006 2 11
7 2
3 10
10 8
1 8
5 2
3 6
6 3
5 3
6 8
7 7
4 7
1 3
7 6
10 5
6 4
9 9
8 4
2 9
6 1
10 7
10 1
9 7
6 9
6 9
3 10
10 10
6 2
7 7
6 5
3 8
4 4
5 2
5 8
8 2
10 9
8 3
7 4
2 2
8 9
8 10
8 9
2 1
1 5
4 7
4 9
6 9
8 10
2 4
6 3
4 1
2 10
3 5
10 7
7 1
4 10
6 6
1 4
4 8
10 9
3 9
5 5
6 1
9 2
2 7
9 5
9 8
1 3
5 6
7 ...

output:

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

result:

ok 

Test #28:

score: 5
Accepted
time: 65ms
memory: 25644kb

input:

100000 2 100000
53479 25002
53479 63606
53479 40735
53479 83340
53479 40775
53479 11458
53479 8684
53479 60405
45116 53479
67722 53479
26014 53479
87860 53479
55147 53479
53479 22726
53479 67769
53479 129
14600 53479
53479 21514
53479 32164
60088 53479
53479 25415
70946 53479
53479 27091
33386 53479...

output:

53479 25002
63606 53479
53479 40735
83340 53479
53479 40775
53479 11458
53479 8684
60405 53479
53479 45116
67722 53479
53479 26014
87860 53479
55147 53479
53479 22726
67769 53479
53479 129
53479 14600
53479 21514
53479 32164
60088 53479
53479 25415
70946 53479
53479 27091
53479 33386
53479 6198
5347...

result:

ok 

Test #29:

score: 5
Accepted
time: 178ms
memory: 42128kb

input:

100000 2 90000
8483 66963
63660 79073
41795 20397
1296 84311
3690 21178
21052 31611
51423 14323
34208 82468
83835 2785
50594 28274
59957 10993
34259 64334
89407 73934
14947 61083
53201 89472
61243 33351
76632 58718
67464 85318
54224 45096
84552 76529
44253 30697
43669 3108
26489 64691
79840 85776
76...

output:

8483 66963
63660 79073
41795 20397
1296 84311
3690 21178
21052 31611
51423 14323
34208 82468
2785 83835
28274 50594
10993 59957
34259 64334
89407 73934
61083 14947
89472 53201
61243 33351
58718 76632
85318 67464
54224 45096
84552 76529
30697 44253
43669 3108
64691 26489
85776 79840
10620 7691
17307 ...

result:

ok 

Test #30:

score: 5
Accepted
time: 179ms
memory: 42096kb

input:

99458 2 99458
80944 83824
25208 26621
57146 28836
43915 18169
59242 47842
34224 78881
38791 20722
89723 91046
72800 40306
92681 94906
41151 7263
76035 13332
93928 38800
97168 86055
44186 73623
68071 7391
20692 72265
44111 42596
36037 77687
64592 836
43568 35187
34861 88539
37477 22111
85787 98028
73...

output:

80944 83824
26621 25208
57146 28836
43915 18169
59242 47842
78881 34224
38791 20722
89723 91046
40306 72800
92681 94906
41151 7263
13332 76035
93928 38800
86055 97168
44186 73623
68071 7391
20692 72265
44111 42596
77687 36037
836 64592
35187 43568
34861 88539
37477 22111
85787 98028
73684 41994
5614...

result:

ok 

Test #31:

score: 5
Accepted
time: 162ms
memory: 42268kb

input:

100000 2 100000
91980 92592
12359 10704
35873 56718
28601 20301
78422 55548
74736 59974
81664 29025
55916 70432
47381 34185
31764 56168
33997 30947
70076 9029
52532 67057
79680 99273
54410 56704
45238 71652
12615 6894
66478 78041
40520 5451
58133 5950
89237 70551
36028 97551
83553 90630
15211 33690
...

output:

92592 91980
12359 10704
35873 56718
28601 20301
55548 78422
74736 59974
29025 81664
70432 55916
47381 34185
56168 31764
33997 30947
70076 9029
67057 52532
99273 79680
56704 54410
45238 71652
6894 12615
66478 78041
5451 40520
5950 58133
70551 89237
97551 36028
90630 83553
33690 15211
6670 74551
42121...

result:

ok 

Test #32:

score: 5
Accepted
time: 160ms
memory: 42468kb

input:

99555 2 99555
79301 40457
40457 80634
49074 21580
92701 14354
44540 70461
47132 47637
84954 27979
87556 60683
22633 43063
49914 63643
4494 3571
88758 53632
17055 50019
49334 79039
67659 50111
17945 48061
84596 60323
14629 72033
77184 30069
64209 36217
49947 35279
45866 44707
58146 58484
1393 53385
4...

output:

40457 79301
80634 40457
21580 49074
14354 92701
70461 44540
47637 47132
27979 84954
60683 87556
22633 43063
49914 63643
3571 4494
88758 53632
50019 17055
79039 49334
50111 67659
48061 17945
84596 60323
14629 72033
30069 77184
36217 64209
35279 49947
45866 44707
58146 58484
53385 1393
48048 49825
568...

result:

ok 

Subtask #4:

score: 5
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #33:

score: 5
Accepted
time: 0ms
memory: 15240kb

input:

3 2 3
1 2
2 3
2 3

output:

1 2
3 2
2 3

result:

ok 

Test #34:

score: 5
Accepted
time: 153ms
memory: 38612kb

input:

89868 2 20001
16598 13223
18759 19981
2642 8681
4102 18080
11473 16749
690 15290
17900 16229
10684 17481
6328 12171
9417 1150
7185 5689
10346 17102
17958 9727
2117 13756
10955 13157
245 2840
5257 5337
16622 6429
17516 10772
13007 19349
11359 2821
14341 8897
3974 2482
16241 17966
18146 15458
3345 158...

output:

13223 16598
18759 19981
8681 2642
18080 4102
11473 16749
690 15290
17900 16229
10684 17481
6328 12171
1150 9417
5689 7185
17102 10346
17958 9727
2117 13756
10955 13157
2840 245
5337 5257
16622 6429
17516 10772
19349 13007
11359 2821
8897 14341
2482 3974
17966 16241
18146 15458
15868 3345
18630 14507...

result:

ok 

Test #35:

score: 5
Accepted
time: 17ms
memory: 14544kb

input:

99006 2 11
7 2
3 10
10 8
1 8
5 2
3 6
6 3
5 3
6 8
7 7
4 7
1 3
7 6
10 5
6 4
9 9
8 4
2 9
6 1
10 7
10 1
9 7
6 9
6 9
3 10
10 10
6 2
7 7
6 5
3 8
4 4
5 2
5 8
8 2
10 9
8 3
7 4
2 2
8 9
8 10
8 9
2 1
1 5
4 7
4 9
6 9
8 10
2 4
6 3
4 1
2 10
3 5
10 7
7 1
4 10
6 6
1 4
4 8
10 9
3 9
5 5
6 1
9 2
2 7
9 5
9 8
1 3
5 6
7 ...

output:

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

result:

ok 

Test #36:

score: 5
Accepted
time: 68ms
memory: 25604kb

input:

100000 2 100000
53479 25002
53479 63606
53479 40735
53479 83340
53479 40775
53479 11458
53479 8684
53479 60405
45116 53479
67722 53479
26014 53479
87860 53479
55147 53479
53479 22726
53479 67769
53479 129
14600 53479
53479 21514
53479 32164
60088 53479
53479 25415
70946 53479
53479 27091
33386 53479...

output:

53479 25002
63606 53479
53479 40735
83340 53479
53479 40775
53479 11458
53479 8684
60405 53479
53479 45116
67722 53479
53479 26014
87860 53479
55147 53479
53479 22726
67769 53479
53479 129
53479 14600
53479 21514
53479 32164
60088 53479
53479 25415
70946 53479
53479 27091
53479 33386
53479 6198
5347...

result:

ok 

Test #37:

score: 5
Accepted
time: 158ms
memory: 42420kb

input:

100000 2 90000
8483 66963
63660 79073
41795 20397
1296 84311
3690 21178
21052 31611
51423 14323
34208 82468
83835 2785
50594 28274
59957 10993
34259 64334
89407 73934
14947 61083
53201 89472
61243 33351
76632 58718
67464 85318
54224 45096
84552 76529
44253 30697
43669 3108
26489 64691
79840 85776
76...

output:

8483 66963
63660 79073
41795 20397
1296 84311
3690 21178
21052 31611
51423 14323
34208 82468
2785 83835
28274 50594
10993 59957
34259 64334
89407 73934
61083 14947
89472 53201
61243 33351
58718 76632
85318 67464
54224 45096
84552 76529
30697 44253
43669 3108
64691 26489
85776 79840
10620 7691
17307 ...

result:

ok 

Test #38:

score: 5
Accepted
time: 152ms
memory: 41816kb

input:

99458 2 99458
80944 83824
25208 26621
57146 28836
43915 18169
59242 47842
34224 78881
38791 20722
89723 91046
72800 40306
92681 94906
41151 7263
76035 13332
93928 38800
97168 86055
44186 73623
68071 7391
20692 72265
44111 42596
36037 77687
64592 836
43568 35187
34861 88539
37477 22111
85787 98028
73...

output:

80944 83824
26621 25208
57146 28836
43915 18169
59242 47842
78881 34224
38791 20722
89723 91046
40306 72800
92681 94906
41151 7263
13332 76035
93928 38800
86055 97168
44186 73623
68071 7391
20692 72265
44111 42596
77687 36037
836 64592
35187 43568
34861 88539
37477 22111
85787 98028
73684 41994
5614...

result:

ok 

Test #39:

score: 5
Accepted
time: 160ms
memory: 42168kb

input:

100000 2 100000
91980 92592
12359 10704
35873 56718
28601 20301
78422 55548
74736 59974
81664 29025
55916 70432
47381 34185
31764 56168
33997 30947
70076 9029
52532 67057
79680 99273
54410 56704
45238 71652
12615 6894
66478 78041
40520 5451
58133 5950
89237 70551
36028 97551
83553 90630
15211 33690
...

output:

92592 91980
12359 10704
35873 56718
28601 20301
55548 78422
74736 59974
29025 81664
70432 55916
47381 34185
56168 31764
33997 30947
70076 9029
67057 52532
99273 79680
56704 54410
45238 71652
6894 12615
66478 78041
5451 40520
5950 58133
70551 89237
97551 36028
90630 83553
33690 15211
6670 74551
42121...

result:

ok 

Test #40:

score: 5
Accepted
time: 162ms
memory: 42272kb

input:

99555 2 99555
79301 40457
40457 80634
49074 21580
92701 14354
44540 70461
47132 47637
84954 27979
87556 60683
22633 43063
49914 63643
4494 3571
88758 53632
17055 50019
49334 79039
67659 50111
17945 48061
84596 60323
14629 72033
77184 30069
64209 36217
49947 35279
45866 44707
58146 58484
1393 53385
4...

output:

40457 79301
80634 40457
21580 49074
14354 92701
70461 44540
47637 47132
27979 84954
60683 87556
22633 43063
49914 63643
3571 4494
88758 53632
50019 17055
79039 49334
50111 67659
48061 17945
84596 60323
14629 72033
30069 77184
36217 64209
35279 49947
45866 44707
58146 58484
53385 1393
48048 49825
568...

result:

ok 

Test #41:

score: 5
Accepted
time: 72ms
memory: 42264kb

input:

100000 2 100000
2 1
3 2
4 3
5 4
6 5
7 6
8 7
9 8
10 9
11 10
12 11
13 12
14 13
15 14
16 15
17 16
18 17
19 18
20 19
21 20
22 21
23 22
24 23
25 24
26 25
27 26
28 27
29 28
30 29
31 30
32 31
33 32
34 33
35 34
36 35
37 36
38 37
39 38
40 39
41 40
42 41
43 42
44 43
45 44
46 45
47 46
48 47
49 48
50 49
51 50
5...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok 

Test #42:

score: 5
Accepted
time: 75ms
memory: 42416kb

input:

99555 2 99555
2 1
3 2
3 4
4 5
6 5
7 6
7 8
8 9
10 9
11 10
11 12
12 13
14 13
15 14
15 16
16 17
18 17
19 18
19 20
20 21
22 21
23 22
23 24
24 25
26 25
27 26
27 28
28 29
30 29
31 30
31 32
32 33
34 33
35 34
35 36
36 37
38 37
39 38
39 40
40 41
42 41
43 42
43 44
44 45
46 45
47 46
47 48
48 49
50 49
51 50
51 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok 

Test #43:

score: 5
Accepted
time: 252ms
memory: 50416kb

input:

100000 2 100000
47641 2360
32311 27712
96580 5576
74432 69601
5497 90724
61408 72215
86499 23207
43465 29593
49534 20236
83680 95890
35990 98338
39222 14744
65183 72902
76527 73553
40936 27695
96356 68239
66861 20211
59817 9499
65669 53200
74170 53434
44590 79062
45816 66321
37251 32926
26433 58003
...

output:

47641 2360
32311 27712
5576 96580
69601 74432
90724 5497
61408 72215
23207 86499
29593 43465
20236 49534
83680 95890
35990 98338
39222 14744
65183 72902
73553 76527
40936 27695
96356 68239
20211 66861
9499 59817
65669 53200
53434 74170
79062 44590
45816 66321
37251 32926
26433 58003
72346 23461
7234...

result:

ok 

Test #44:

score: 5
Accepted
time: 0ms
memory: 14620kb

input:

20 2 20
18 2
12 5
20 9
4 2
17 4
7 15
9 2
5 5
13 15
19 5
3 5
10 19
8 5
7 10
9 11
3 16
7 18
9 5
3 8
18 4

output:

18 2
5 12
9 20
2 4
4 17
7 15
2 9
5 5
15 13
5 19
5 3
19 10
8 5
10 7
11 9
3 16
7 18
9 5
3 8
4 18

result:

ok 

Test #45:

score: 5
Accepted
time: 28ms
memory: 16592kb

input:

99000 2 100
50 76
35 53
70 8
48 61
12 98
81 72
62 87
10 6
61 83
63 42
66 10
7 46
35 66
47 52
30 60
70 33
27 16
32 82
8 28
85 83
95 21
63 84
47 57
89 86
73 69
52 60
72 78
78 61
61 36
3 73
31 50
47 20
69 28
74 34
100 79
99 56
51 43
86 15
38 28
3 94
63 76
19 56
31 90
79 97
3 23
14 44
78 63
99 85
14 50
...

output:

76 50
53 35
70 8
61 48
98 12
81 72
87 62
10 6
83 61
63 42
66 10
46 7
66 35
52 47
60 30
70 33
27 16
82 32
28 8
85 83
95 21
84 63
57 47
89 86
73 69
60 52
78 72
78 61
61 36
73 3
50 31
47 20
69 28
74 34
100 79
99 56
51 43
86 15
38 28
94 3
76 63
56 19
90 31
97 79
23 3
44 14
78 63
99 85
50 14
90 4
87 41
9...

result:

ok 

Test #46:

score: 5
Accepted
time: 167ms
memory: 45420kb

input:

99000 2 40000
13317 12923
15159 469
15225 23585
11180 1824
7967 39735
13852 38886
33137 27292
21697 28740
9887 13116
25732 33405
9156 39496
24569 31286
12900 32138
2345 1862
18626 2824
19382 25016
11342 18721
10236 296
37626 8228
30418 10247
29998 33581
21676 4543
39650 14279
8842 1957
15206 22521
1...

output:

13317 12923
15159 469
15225 23585
11180 1824
39735 7967
38886 13852
33137 27292
28740 21697
9887 13116
33405 25732
9156 39496
31286 24569
32138 12900
2345 1862
18626 2824
19382 25016
18721 11342
10236 296
37626 8228
10247 30418
29998 33581
21676 4543
39650 14279
8842 1957
15206 22521
34238 10717
175...

result:

ok 

Test #47:

score: 5
Accepted
time: 128ms
memory: 36092kb

input:

50000 2 100000
98362 76208
42505 92719
18460 89381
66596 99759
12116 82137
92591 4043
134 72622
43432 47060
48543 74386
24648 12398
15658 30807
44636 99813
53782 10967
99129 43783
31224 17380
1594 90445
4363 11935
83427 79197
57698 64946
55536 76058
25332 10458
66313 31325
77601 43931
23727 27286
38...

output:

76208 98362
42505 92719
89381 18460
66596 99759
12116 82137
92591 4043
134 72622
47060 43432
48543 74386
12398 24648
15658 30807
44636 99813
10967 53782
99129 43783
31224 17380
90445 1594
11935 4363
79197 83427
57698 64946
55536 76058
10458 25332
31325 66313
77601 43931
27286 23727
3848 46530
1773 7...

result:

ok 

Test #48:

score: 5
Accepted
time: 11ms
memory: 20588kb

input:

1000 2 90000
23815 25217
6968 45020
4010 7431
26939 4476
2589 64334
32215 84328
8428 78626
15793 9319
30520 48129
73647 7113
69869 35054
2118 65562
13093 15772
66586 74609
2641 56451
80789 47288
35419 63553
4412 70594
45845 37418
71587 74602
19228 59932
53972 84459
7561 23333
29074 12664
26734 61072...

output:

23815 25217
6968 45020
4010 7431
4476 26939
2589 64334
32215 84328
8428 78626
9319 15793
30520 48129
7113 73647
35054 69869
2118 65562
13093 15772
66586 74609
2641 56451
47288 80789
35419 63553
4412 70594
37418 45845
71587 74602
19228 59932
53972 84459
7561 23333
12664 29074
26734 61072
7825 65686
4...

result:

ok 

Test #49:

score: 5
Accepted
time: 2ms
memory: 14368kb

input:

20 2 12
12 11
1 9
12 12
3 4
3 9
8 3
8 11
10 9
4 3
6 7
11 6
11 3
7 10
12 10
11 10
11 11
11 2
1 12
6 12
2 7

output:

11 12
1 9
12 12
4 3
9 3
3 8
8 11
10 9
3 4
7 6
6 11
11 3
7 10
12 10
10 11
11 11
11 2
12 1
6 12
2 7

result:

ok 

Test #50:

score: 5
Accepted
time: 3ms
memory: 13624kb

input:

20 2 8
7 7
7 8
6 4
7 4
6 2
4 6
1 3
2 3
8 3
6 7
1 5
6 3
2 5
1 4
2 2
6 2
6 3
2 5
5 3
3 3

output:

7 7
8 7
6 4
7 4
6 2
4 6
1 3
3 2
3 8
6 7
1 5
6 3
5 2
4 1
2 2
2 6
3 6
2 5
5 3
3 3

result:

ok 

Test #51:

score: 5
Accepted
time: 3ms
memory: 14260kb

input:

12 2 20
13 1
4 14
14 13
17 1
8 15
14 5
3 7
20 6
1 9
19 11
6 20
11 13

output:

13 1
4 14
14 13
1 17
8 15
14 5
3 7
20 6
1 9
11 19
6 20
13 11

result:

ok 

Test #52:

score: 5
Accepted
time: 0ms
memory: 15288kb

input:

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

output:

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

result:

ok 

Test #53:

score: 5
Accepted
time: 3ms
memory: 13948kb

input:

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

output:

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

result:

ok 

Test #54:

score: 5
Accepted
time: 168ms
memory: 42960kb

input:

100000 2 100000
70318 14894
32116 90327
63866 29061
53683 63612
70370 78264
42647 76881
39251 31741
61186 66491
57686 65819
53278 59145
71962 26052
81040 55279
50859 51310
46800 24546
85013 91165
61530 21890
84003 29099
33573 86182
49212 10639
91851 97312
57682 14067
5243 69674
99007 62508
26290 555...

output:

14894 70318
32116 90327
63866 29061
53683 63612
78264 70370
76881 42647
31741 39251
61186 66491
57686 65819
53278 59145
26052 71962
55279 81040
50859 51310
24546 46800
85013 91165
21890 61530
29099 84003
33573 86182
49212 10639
97312 91851
14067 57682
69674 5243
99007 62508
26290 55524
43794 15519
5...

result:

ok 

Test #55:

score: 5
Accepted
time: 157ms
memory: 42028kb

input:

98045 2 95001
27085 59126
75021 23663
67175 78883
3919 90698
20718 67504
49374 44011
1660 3236
71971 79270
24502 90540
54202 9732
14395 88659
56600 52635
21912 17986
92420 56526
40254 3472
64330 20431
9381 56003
57750 45529
45230 9388
83797 53437
75562 47526
63126 45219
71020 87437
50298 2016
21982 ...

output:

27085 59126
75021 23663
78883 67175
3919 90698
20718 67504
44011 49374
3236 1660
79270 71971
24502 90540
9732 54202
14395 88659
56600 52635
17986 21912
92420 56526
3472 40254
20431 64330
56003 9381
45529 57750
9388 45230
53437 83797
47526 75562
63126 45219
87437 71020
2016 50298
21982 43667
37443 85...

result:

ok 

Subtask #5:

score: 0
Runtime Error

Test #56:

score: 0
Runtime Error

input:

3 4 3
2 3 2 2
2 3 3 2
2 2 3 2

output:


result:


Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #6:

0%

Subtask #8:

score: 0
Skipped

Dependency #2:

100%
Accepted

Dependency #5:

0%

Subtask #9:

score: 0
Skipped

Dependency #3:

100%
Accepted

Dependency #6:

0%

Subtask #10:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

0%