QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#572961#9301. Skeleton Dynamizationucup-team4744#TL 528ms126644kbC++203.2kb2024-09-18 16:56:242024-09-18 16:56:24

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 7836kb

input:

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

output:

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

result:

ok correct, length=3

Test #2:

score: 0
Accepted
time: 1ms
memory: 7916kb

input:

3 3
1 2
2 3
3 1

output:

1 3
1 2 3

result:

ok correct, length=1

Test #3:

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

input:

4 3
1 2
2 3
4 3

output:

4 1
1
2
3
4

result:

ok correct, length=4

Test #4:

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

input:

14 22
1 2
2 3
3 4
4 5
5 1
6 7
7 8
8 9
9 10
10 6
11 12
11 13
11 14
12 13
12 14
13 14
1 6
2 7
3 8
4 9
5 10
6 11

output:

1 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14

result:

ok correct, length=1

Test #5:

score: 0
Accepted
time: 1ms
memory: 3776kb

input:

1 0

output:

1 1
1

result:

ok correct, length=1

Test #6:

score: 0
Accepted
time: 1ms
memory: 8192kb

input:

4 4
1 4
2 1
4 3
2 3

output:

2 2
1 2
4 3

result:

ok correct, length=2

Test #7:

score: 0
Accepted
time: 2ms
memory: 9944kb

input:

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

output:

2 3
1 4 6
2 5 3

result:

ok correct, length=2

Test #8:

score: 0
Accepted
time: 2ms
memory: 9940kb

input:

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

output:

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

result:

ok correct, length=2

Test #9:

score: 0
Accepted
time: 2ms
memory: 10204kb

input:

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

output:

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

result:

ok correct, length=2

Test #10:

score: 0
Accepted
time: 1ms
memory: 10000kb

input:

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

output:

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

result:

ok correct, length=2

Test #11:

score: 0
Accepted
time: 1ms
memory: 9940kb

input:

32 90
17 25
18 26
21 9
22 10
27 21
28 22
21 25
22 26
1 21
2 22
9 19
10 20
27 15
28 16
3 25
4 26
7 27
8 28
3 13
4 14
23 29
24 30
31 7
32 8
29 11
30 12
15 17
16 18
23 5
24 6
31 1
32 2
17 3
18 4
23 19
24 20
9 17
10 18
15 25
16 26
7 1
8 2
5 1
6 2
11 7
12 8
19 1
20 2
31 29
32 30
7 19
8 20
9 13
10 14
13 2...

output:

2 16
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32

result:

ok correct, length=2

Test #12:

score: 0
Accepted
time: 1ms
memory: 8188kb

input:

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

output:

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

result:

ok correct, length=2

Test #13:

score: 0
Accepted
time: 1ms
memory: 9968kb

input:

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

output:

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

result:

ok correct, length=1

Test #14:

score: 0
Accepted
time: 1ms
memory: 10200kb

input:

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

output:

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

result:

ok correct, length=1

Test #15:

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

input:

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

output:

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

result:

ok correct, length=1

Test #16:

score: 0
Accepted
time: 1ms
memory: 9976kb

input:

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

output:

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

result:

ok correct, length=1

Test #17:

score: 0
Accepted
time: 1ms
memory: 10036kb

input:

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

output:

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

result:

ok correct, length=1

Test #18:

score: 0
Accepted
time: 1ms
memory: 10012kb

input:

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

output:

1 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 26

result:

ok correct, length=1

Test #19:

score: 0
Accepted
time: 1ms
memory: 9992kb

input:

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

output:

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

result:

ok correct, length=2

Test #20:

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

input:

243 1215
67 149
227 161
27 51
206 68
106 137
213 44
31 61
46 194
209 143
52 19
217 125
132 102
105 192
216 4
205 147
194 84
60 73
155 33
67 157
123 160
121 46
61 205
210 94
88 197
226 15
145 60
130 114
184 58
218 95
37 134
71 43
217 140
103 214
180 120
84 212
213 93
198 171
208 154
231 68
181 111
12...

output:

1 243
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 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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...

result:

ok correct, length=1

Test #21:

score: 0
Accepted
time: 1ms
memory: 7996kb

input:

162 729
10 36
75 50
36 78
76 52
62 128
23 134
132 49
89 30
111 114
18 71
46 114
128 111
111 159
19 6
83 121
55 12
44 95
106 91
99 50
69 24
40 42
60 103
35 61
28 91
5 29
89 122
78 104
1 113
17 31
22 11
8 34
6 74
43 2
27 132
15 72
81 105
143 78
53 74
5 45
85 130
119 42
67 100
78 90
35 161
156 90
130 1...

output:

2 81
1 2 4 5 8 10 11 13 16 17 21 22 23 24 25 26 27 28 29 30 31 33 34 38 39 42 44 45 47 48 50 52 56 57 60 63 64 69 75 76 77 82 84 85 86 88 89 91 94 95 97 99 102 103 106 111 113 114 116 118 119 122 124 125 126 128 133 134 135 137 138 141 143 147 150 151 153 155 156 159 160
105 43 65 51 14 36 161 67 11...

result:

ok correct, length=2

Test #22:

score: 0
Accepted
time: 528ms
memory: 126644kb

input:

5000 19000
2567 320
3757 1281
4856 582
4786 3232
4651 3026
4746 2499
4931 1644
1110 4723
2227 4722
4238 3466
4060 489
3164 2664
2253 3356
3370 1202
774 1178
519 3400
3466 1920
3741 4356
4941 3301
4303 2327
2849 4580
4861 2289
4066 1954
4101 4187
4432 1149
3616 4873
2844 3801
3755 931
2089 689
4195 4...

output:

5 1000
2 13 15 18 20 21 24 25 29 34 37 39 66 68 69 70 73 75 77 85 87 88 94 101 109 122 129 131 135 136 143 153 160 162 168 174 181 192 194 195 197 198 201 206 208 209 214 216 223 227 232 239 245 254 261 262 269 272 275 285 289 300 303 304 305 306 313 323 328 333 335 336 338 341 348 349 354 359 373 3...

result:

ok correct, length=5

Test #23:

score: 0
Accepted
time: 2ms
memory: 9932kb

input:

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

output:

1 8
1 2 3 4 5 6 7 8

result:

ok correct, length=1

Test #24:

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

input:

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

output:

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

result:

ok correct, length=2

Test #25:

score: 0
Accepted
time: 1ms
memory: 9932kb

input:

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

output:

1 4
1 2 3 4

result:

ok correct, length=1

Test #26:

score: -100
Time Limit Exceeded

input:

16384 114688
7724 15711
2622 11637
6678 12087
562 1017
1794 15380
2337 8273
3247 11939
4236 10764
10400 12609
11663 8529
15404 12196
16243 14355
10882 315
3181 8641
15945 2660
1752 6947
3241 3770
5914 5981
8688 6502
703 13187
9949 688
4183 2599
12150 5172
12263 2346
6910 14326
3030 3505
4874 10690
1...

output:


result: