QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#522165#2550. Lion and ZebraUrdTL 93ms39260kbC++171.8kb2024-08-16 19:22:062024-08-16 19:22:06

詳細信息

Test #1:

score: 100
Accepted
time: 4ms
memory: 16100kb

input:

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

output:

4
1

result:

ok 2 number(s): "4 1"

Test #2:

score: 0
Accepted
time: 3ms
memory: 15116kb

input:

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

output:

2
5

result:

ok 2 number(s): "2 5"

Test #3:

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

input:

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

output:

5
3

result:

ok 2 number(s): "5 3"

Test #4:

score: 0
Accepted
time: 0ms
memory: 39232kb

input:

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

output:

3
2
5
4
5
1
1
4
3

result:

ok 9 numbers

Test #5:

score: 0
Accepted
time: 60ms
memory: 39260kb

input:

175 7862
70 167
102 128
3 76
46 42
104 112
53 46
52 99
172 116
48 158
40 138
11 103
26 8
59 147
163 88
71 133
130 134
98 73
115 104
28 166
5 173
148 61
38 45
173 73
96 10
36 58
124 59
94 73
137 136
79 164
21 11
27 161
9 152
37 101
123 131
145 68
111 156
153 51
61 73
4 93
54 157
33 69
47 12
144 115
1...

output:

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

result:

ok 7862 numbers

Test #6:

score: 0
Accepted
time: 74ms
memory: 39164kb

input:

121 3803
42 27
26 2
120 41
72 6
39 35
98 53
102 79
21 74
90 98
88 13
18 107
68 91
53 16
52 112
111 39
46 12
116 87
10 77
22 80
115 10
55 17
109 49
89 61
60 11
86 1
65 47
79 24
20 76
35 25
63 84
73 28
47 60
85 88
104 55
54 97
62 118
45 115
110 18
17 75
96 93
37 14
57 67
7 62
30 21
24 78
81 90
25 69
4...

output:

1
2
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42
1
2
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
40
41
42
1
2
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
...

result:

ok 3803 numbers

Test #7:

score: 0
Accepted
time: 43ms
memory: 39168kb

input:

97 2467
13 69
63 62
45 53
48 79
28 7
4 25
12 54
94 92
39 10
82 48
47 87
84 9
25 17
46 43
26 8
61 96
88 55
69 86
96 41
2 13
22 45
8 23
74 28
40 89
71 7
15 81
60 49
58 90
19 67
97 4
95 39
55 51
67 46
81 42
44 7
72 66
29 44
36 73
49 36
50 32
91 78
43 75
9 21
27 20
68 12
53 74
65 71
93 29
66 63
1 22
34 ...

output:

1
2
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
1
2
12
13
14
15
16
17
18
19
20
21
22
23
24
25
27
28
29
30
31
32
33
34
1
2
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
1
2
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
29
30
31
32
33
34
1
2
11
12
13
14
15
16
17
18
1...

result:

ok 2467 numbers

Test #8:

score: 0
Accepted
time: 93ms
memory: 39256kb

input:

175 7862
95 145
169 90
166 160
9 168
35 166
149 173
156 85
8 19
120 88
96 117
155 66
101 10
63 94
151 120
92 4
28 129
106 141
135 151
59 121
137 157
103 46
5 135
107 41
18 21
150 63
133 37
26 13
121 112
123 101
162 72
154 106
69 62
19 150
14 146
67 49
21 79
93 64
148 20
172 156
131 17
97 104
108 119...

output:

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

result:

ok 7862 numbers

Test #9:

score: 0
Accepted
time: 36ms
memory: 39228kb

input:

73 1419
48 1
51 28
46 36
33 28
55 17
7 4
50 66
38 53
56 42
47 21
21 30
32 50
19 26
39 45
66 73
37 28
63 10
41 29
68 69
8 24
29 62
53 37
9 72
24 68
18 43
5 65
42 71
58 49
26 8
22 13
57 16
11 22
40 41
65 7
6 56
36 20
3 34
69 70
59 18
4 27
25 19
49 59
10 55
44 35
2 47
61 9
73 58
71 28
16 28
60 63
72 15...

output:

1
2
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1
2
8
9
10
11
12
13
14
15
16
17
18
19
20
21
23
24
25
26
1
2
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2...

result:

ok 1419 numbers

Test #10:

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

input:

6 1
1 2
2 3
3 4
2 5
5 6
4 4

output:

4

result:

ok 1 number(s): "4"

Test #11:

score: -100
Time Limit Exceeded

input:

100000 100000
6924 97704
51795 94079
85721 1451
51436 64102
22887 53289
62490 70035
53601 3516
35670 75950
99585 97911
10866 63419
36928 36457
72357 2042
9384 15284
31844 68380
60095 40587
47577 71274
7890 30139
12208 24775
31163 44315
9019 68509
79484 86871
77532 24228
80137 97728
54885 50661
91242...

output:


result: