QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#118488#4303. New LevellarryzhongML 903ms422360kbC++172.3kb2023-07-03 16:39:432023-07-03 16:39:46

詳細信息

Test #1:

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

input:

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

output:

1 2 3 2

result:

ok n=4, m=4, k=4

Test #2:

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

input:

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

output:

3 2 3 3 1 2 3 1 1 2

result:

ok n=10, m=9, k=3

Test #3:

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

input:

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

output:

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

result:

ok n=239, m=238, k=10

Test #4:

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

input:

2392 2391 100
89 13 96 29 35 81 10 62 30 4 46 56 15 37 61 8 45 47 5 29 23 64 98 50 18 34 28 24 20 24 10 43 34 28 64 100 61 22 68 37 61 49 37 74 64 53 1 84 54 30 46 25 21 31 96 49 74 19 4 10 29 72 27 48 28 99 74 8 32 89 46 68 73 87 41 72 25 2 27 66 77 90 24 78 65 34 67 25 11 9 16 17 87 2 56 58 48 56 ...

output:

17 18 17 17 16 17 16 17 16 17 18 17 16 18 17 16 17 16 17 16 16 15 18 16 19 16 16 16 17 16 18 15 17 18 17 16 16 16 16 15 15 15 15 18 16 17 16 16 16 15 18 16 16 17 17 18 16 16 17 14 17 15 17 16 16 15 15 16 16 16 15 16 17 16 17 17 17 17 16 16 19 16 14 17 18 16 16 17 19 17 15 16 16 15 15 15 17 16 16 18 ...

result:

ok n=2392, m=2391, k=100

Test #5:

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

input:

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

output:

1 3 1 2

result:

ok n=4, m=3, k=3

Test #6:

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

input:

5000 4999 215
75 104 70 136 199 28 108 67 92 90 200 35 184 21 81 200 48 193 172 143 109 43 89 94 195 149 176 198 96 101 199 207 112 29 7 123 59 3 14 38 99 152 188 15 188 179 47 190 199 117 3 63 187 77 14 166 41 8 7 209 211 95 6 80 174 135 211 95 211 189 180 118 210 20 111 24 192 67 129 116 182 17 17...

output:

135 134 134 133 134 135 133 133 133 132 132 134 133 133 134 134 131 135 130 129 128 130 134 134 130 132 133 132 133 133 134 129 135 132 133 133 131 130 133 134 134 133 134 134 128 133 130 133 133 133 134 134 133 132 134 133 132 133 134 129 132 135 133 133 130 129 132 132 131 135 134 132 134 127 132 ...

result:

ok n=5000, m=4999, k=215

Test #7:

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

input:

5000 4999 215
155 162 166 204 39 176 58 184 65 113 129 76 118 27 143 103 22 1 209 135 32 117 55 152 197 66 199 5 186 166 53 101 34 91 148 2 70 51 202 80 1 41 31 143 44 102 145 13 90 100 163 185 211 77 45 48 26 123 4 104 20 168 154 142 90 153 149 163 38 172 29 133 62 189 107 89 37 210 57 24 25 55 123...

output:

174 175 176 177 176 177 176 177 178 179 180 179 178 179 178 179 180 179 178 177 178 177 178 177 178 179 178 177 178 177 176 177 178 177 178 179 180 179 178 177 178 179 178 177 176 177 178 179 178 179 180 181 182 183 182 181 182 181 182 183 182 181 180 181 180 181 180 181 182 181 180 181 180 181 180 ...

result:

ok n=5000, m=4999, k=215

Test #8:

score: 0
Accepted
time: 101ms
memory: 22568kb

input:

100000 99999 215
144 87 149 51 25 51 108 78 135 17 73 188 186 148 9 184 206 1 35 53 29 31 200 78 63 136 158 54 153 103 71 83 60 94 89 7 215 85 150 179 210 130 161 112 93 213 106 189 162 43 173 141 185 192 160 210 196 197 185 33 136 85 103 150 197 140 202 45 51 133 177 16 66 106 70 140 35 66 14 112 1...

output:

105 106 105 105 106 106 105 104 104 105 105 105 103 103 104 105 104 104 103 107 104 105 102 104 105 105 104 103 104 105 103 104 103 104 105 104 105 102 103 104 104 104 105 104 103 104 105 104 104 104 106 104 105 104 106 104 103 105 103 103 105 103 103 103 104 106 105 105 106 104 104 103 105 104 103 ...

result:

ok n=100000, m=99999, k=215

Test #9:

score: 0
Accepted
time: 80ms
memory: 22820kb

input:

100000 99999 215
8 183 153 16 17 143 160 152 91 68 8 161 194 91 107 15 206 155 125 10 109 22 77 17 151 148 175 139 182 167 153 115 16 113 58 182 191 203 215 106 34 159 17 182 139 44 30 129 105 134 57 157 32 56 214 5 62 180 175 61 120 15 214 97 103 24 209 194 127 87 204 89 156 2 36 74 114 163 206 97 ...

output:

26 27 26 27 28 29 30 29 28 27 28 27 28 29 30 29 28 27 26 27 26 27 28 27 28 27 26 25 26 25 26 25 24 25 24 23 24 25 26 27 26 25 24 25 24 25 24 23 22 21 20 21 22 23 22 23 24 23 24 23 24 25 24 23 24 25 24 23 22 23 22 23 24 23 22 23 24 25 26 25 26 27 26 27 28 27 28 27 28 29 28 27 26 27 26 27 26 27 26 27 ...

result:

ok n=100000, m=99999, k=215

Test #10:

score: 0
Accepted
time: 312ms
memory: 50308kb

input:

239239 239238 239
146 41 60 184 200 183 12 18 119 159 195 222 203 34 50 160 207 170 130 87 232 87 92 221 84 33 38 237 187 102 50 204 3 135 227 23 110 116 215 28 27 238 239 91 153 214 233 193 77 167 203 167 83 200 214 234 68 188 232 197 67 17 210 199 17 222 103 213 99 212 159 76 134 182 89 134 44 92 ...

output:

26 25 25 24 25 24 27 24 26 23 24 26 25 23 25 25 24 23 24 24 22 24 24 26 22 25 23 25 24 22 26 23 24 24 23 23 22 23 24 28 27 21 23 23 25 23 24 24 24 24 25 27 23 22 25 22 23 24 24 26 25 24 26 25 22 26 26 25 21 22 25 25 24 25 27 24 25 23 26 24 25 24 22 23 25 26 21 25 23 26 24 24 25 23 24 26 26 22 25 27 ...

result:

ok n=239239, m=239238, k=239

Test #11:

score: 0
Accepted
time: 68ms
memory: 20128kb

input:

73223 73222 456
176 375 93 323 28 186 232 176 6 374 42 15 169 308 221 137 388 221 345 86 170 251 432 288 394 21 122 351 430 78 216 133 119 278 100 163 46 278 294 234 68 239 64 202 41 194 410 253 352 153 333 363 120 379 235 286 412 299 20 71 139 369 306 390 327 78 165 245 313 275 6 140 274 417 335 24...

output:

92 91 93 92 93 92 92 92 91 91 94 91 90 91 92 93 90 93 94 93 92 90 91 93 90 92 92 91 93 92 91 93 93 92 94 92 93 89 91 91 88 91 92 90 92 92 90 93 92 95 91 90 91 93 91 89 90 89 89 92 93 91 94 92 92 92 91 92 93 92 88 94 92 92 88 92 94 88 94 90 89 91 91 92 93 92 93 90 94 90 92 91 92 93 91 93 91 91 87 93 ...

result:

ok n=73223, m=73222, k=456

Test #12:

score: 0
Accepted
time: 728ms
memory: 100844kb

input:

500000 499999 120
120 109 52 88 118 102 96 49 54 40 65 119 104 14 83 86 70 71 108 13 89 86 79 93 2 3 84 120 10 22 116 111 41 2 25 18 65 70 99 99 107 21 75 98 24 95 106 40 40 77 26 103 53 63 35 120 80 56 38 35 82 24 108 26 35 88 47 53 29 8 15 53 89 67 109 69 64 9 51 3 2 99 48 11 82 90 47 91 47 31 9 7...

output:

35 36 37 36 34 35 36 35 34 34 35 36 33 33 36 35 35 33 32 35 35 32 36 34 34 37 31 30 35 36 34 33 36 36 37 33 33 35 31 29 36 36 33 34 32 33 30 36 35 33 35 36 33 35 32 35 32 34 35 34 35 32 36 35 35 30 35 35 33 33 35 36 32 34 34 35 34 37 35 37 34 33 35 34 36 35 34 34 30 36 31 35 32 34 32 33 35 33 37 34 ...

result:

ok n=500000, m=499999, k=120

Test #13:

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

input:

3 2 2
1 2 2
2 1
3 1

output:

1 2 2

result:

ok n=3, m=2, k=2

Test #14:

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

input:

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

output:

2 1 3 1

result:

ok n=4, m=3, k=3

Test #15:

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

input:

2 1 2
1 2
2 1

output:

1 2

result:

ok n=2, m=1, k=2

Test #16:

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

input:

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

output:

1 2 3 4 5 6 7 8 9 10

result:

ok n=10, m=45, k=10

Test #17:

score: 0
Accepted
time: 40ms
memory: 7468kb

input:

1000 499500 1000
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 9...

output:

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 101 102 ...

result:

ok n=1000, m=499500, k=1000

Test #18:

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

input:

239 28441 239
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 9...

output:

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 101 102 ...

result:

ok n=239, m=28441, k=239

Test #19:

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

input:

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

output:

1 2 3 4

result:

ok n=4, m=6, k=4

Test #20:

score: 0
Accepted
time: 24ms
memory: 7468kb

input:

999 498501 999
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 ...

output:

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 101 102 ...

result:

ok n=999, m=498501, k=999

Test #21:

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

input:

30 435 30
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
1 3
1 4
1 6
1 7
1 8
1 9
1 10
1 13
1 17
1 20
1 21
1 25
1 26
1 27
2 1
2 4
2 5
2 6
2 8
2 11
2 14
2 15
2 16
2 17
2 18
2 19
2 21
2 23
2 26
2 27
2 29
3 2
3 6
3 7
3 12
3 13
3 15
3 16
3 17
3 20
3 21
3 27
3 29
3 30
4 3...

output:

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

result:

ok n=30, m=435, k=30

Test #22:

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

input:

37 666 37
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
1 3
1 9
1 10
1 11
1 14
1 17
1 18
1 19
1 23
1 25
1 26
1 28
1 29
1 30
1 31
1 34
1 35
1 37
2 1
2 5
2 7
2 8
2 9
2 11
2 12
2 14
2 15
2 18
2 19
2 20
2 21
2 23
2 24
2 25
2 26
2 30
2 33
2 35
2 37
...

output:

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

result:

ok n=37, m=666, k=37

Test #23:

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

input:

500 124750 500
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 ...

output:

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 101 102 ...

result:

ok n=500, m=124750, k=500

Test #24:

score: 0
Accepted
time: 37ms
memory: 7700kb

input:

988 487578 988
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 ...

output:

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 101 102 ...

result:

ok n=988, m=487578, k=988

Test #25:

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

input:

932 433846 932
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 ...

output:

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 101 102 ...

result:

ok n=932, m=433846, k=932

Test #26:

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

input:

1 0 1
1

output:

1

result:

ok n=1, m=0, k=1

Test #27:

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

input:

2 1 2
1 2
2 1

output:

1 2

result:

ok n=2, m=1, k=2

Test #28:

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

input:

2 1 2
1 2
2 1

output:

1 2

result:

ok n=2, m=1, k=2

Test #29:

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

input:

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

output:

1 2 3 2 3 2 3 2 3 2

result:

ok n=10, m=9, k=4

Test #30:

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

input:

1000 10000 100
87 95 7 96 16 76 19 68 100 93 31 85 63 77 82 42 85 33 98 25 89 25 99 92 24 87 80 86 77 67 3 5 19 90 33 86 89 38 26 14 19 40 28 14 99 31 60 87 19 71 10 14 37 66 68 64 89 4 91 37 28 19 76 72 91 70 31 37 28 42 26 24 38 51 63 6 22 22 44 1 55 40 36 69 82 61 5 91 32 63 60 73 99 31 54 2 66 1...

output:

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

result:

ok n=1000, m=10000, k=100

Test #31:

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

input:

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

output:

2 3 3 2 3 3 2 2 4 2

result:

ok n=10, m=15, k=5

Test #32:

score: 0
Accepted
time: 76ms
memory: 10888kb

input:

30000 200000 1000
162 342 574 762 997 367 451 858 680 686 720 881 700 749 927 392 402 652 137 152 772 549 639 593 954 152 409 350 325 94 577 222 813 409 279 83 142 577 445 294 878 215 884 801 159 581 468 714 291 755 127 229 922 931 206 578 780 741 617 530 788 514 234 413 130 580 834 437 688 867 89 3...

output:

269 49 65 137 269 982 29 181 133 153 132 269 105 212 239 54 28 100 261 980 205 132 131 57 213 955 57 984 9 261 97 297 180 5 987 240 249 87 54 14 218 975 182 167 293 107 63 121 992 174 270 280 188 981 274 54 156 133 169 55 145 103 978 46 973 146 153 12 120 199 294 34 298 85 973 80 55 205 958 190 284 ...

result:

ok n=30000, m=200000, k=1000

Test #33:

score: 0
Accepted
time: 77ms
memory: 10052kb

input:

23923 239239 239239
218201 175552 191424 205458 207189 210258 173683 109081 22520 167503 135263 100313 116435 226001 14596 10832 101211 197385 144248 140485 196107 176044 197145 162189 51641 49690 205181 144176 22360 112556 95875 14356 44237 116133 126644 146286 41030 220736 234286 123941 201457 151...

output:

98319 98237 98275 98276 98283 98284 98274 98126 98369 98231 98187 98102 98131 98321 98391 98364 98128 98314 98203 98190 98367 98268 98276 98284 98430 98429 98331 98191 98410 98129 98115 98383 98453 98186 98162 98236 98416 98320 98326 98208 98320 98261 98387 98387 98341 98276 98231 98374 98159 98476 ...

result:

ok n=23923, m=239239, k=239239

Test #34:

score: 0
Accepted
time: 50ms
memory: 7524kb

input:

10000 239000 1000
830 816 588 81 331 726 933 772 964 22 226 696 247 557 199 314 89 400 609 373 678 44 645 768 52 101 704 464 79 922 623 368 973 54 823 535 467 167 693 58 933 898 502 92 881 979 768 972 923 729 14 838 473 735 255 328 719 243 727 406 164 866 178 445 74 297 567 291 792 989 866 84 523 61...

output:

923 906 823 673 748 896 620 889 627 667 706 864 714 820 696 735 662 771 833 752 850 657 838 889 652 687 901 779 664 626 835 747 625 677 914 806 792 713 861 665 619 621 790 668 939 628 887 621 935 871 650 919 789 875 719 736 867 708 868 768 699 923 700 786 662 724 809 723 906 625 917 667 805 843 909 ...

result:

ok n=10000, m=239000, k=1000

Test #35:

score: 0
Accepted
time: 122ms
memory: 12000kb

input:

20000 500000 1000
419 672 848 423 906 141 551 685 125 226 873 586 785 669 914 99 610 843 734 869 854 729 140 254 241 436 704 522 737 9 607 950 875 788 295 920 731 523 91 28 942 779 729 47 579 905 623 87 660 930 160 88 593 971 467 895 685 432 147 522 509 583 111 445 399 533 883 325 784 919 59 656 732...

output:

591 698 321 592 344 482 658 715 464 492 341 663 298 694 355 432 689 323 256 346 322 255 463 515 499 617 717 627 269 435 679 363 330 291 525 353 258 634 435 420 360 304 259 414 656 348 680 436 700 375 461 437 680 376 624 339 253 608 461 626 667 668 447 607 573 633 341 541 287 357 420 255 287 558 445 ...

result:

ok n=20000, m=500000, k=1000

Test #36:

score: 0
Accepted
time: 275ms
memory: 27020kb

input:

100000 500000 33000
9268 12341 19458 7922 16366 4090 22601 17440 25495 20980 22841 4456 12772 19555 12480 7078 27427 441 11155 27391 25695 3933 14143 30783 31007 10612 4833 8341 23303 18666 15933 32789 11645 24228 21960 5715 25308 30560 6089 21958 11067 32266 5051 13065 4942 10544 14020 32626 2690 1...

output:

10778 10779 11005 11150 10814 11122 10830 10739 10947 10848 10915 10646 10810 10812 10669 10787 10934 11085 10669 10917 10933 10671 10777 11032 11033 10851 11099 11153 10695 10752 10751 11149 10675 10951 11060 10674 10982 11020 10647 11061 10676 11169 11170 10741 10657 10658 10727 11036 11181 10728 ...

result:

ok n=100000, m=500000, k=33000

Test #37:

score: 0
Accepted
time: 903ms
memory: 103320kb

input:

500000 500000 500000
211528 388055 34644 166109 384814 413216 108307 120428 430880 36146 461434 354152 400903 328422 357107 124169 420364 153811 72615 437513 92697 194228 26206 328865 118741 274081 247329 112425 388234 73875 332122 132252 187681 256132 452658 344401 166979 32236 106225 301058 450650...

output:

410472 410471 410471 410470 410471 410470 410471 410471 410471 410471 410472 410470 410470 410473 410470 410471 410471 410469 410472 410472 410470 410472 410471 410471 410472 410469 410468 410471 410470 410471 410470 410473 410470 410470 410472 410470 410469 410471 410470 410470 410470 410469 410471...

result:

ok n=500000, m=500000, k=500000

Test #38:

score: 0
Accepted
time: 728ms
memory: 102764kb

input:

500000 499999 123901
32379 104763 83694 71174 84740 51729 77708 29454 53825 32137 102754 1120 95274 11534 107584 16626 16587 108925 81688 117022 117367 116972 9134 22288 92320 20504 13277 18003 58760 31410 23254 96631 16410 84996 20154 67148 119437 60466 25231 16742 13440 36401 21212 63998 62267 765...

output:

94273 94272 94272 94273 94274 94272 94272 94272 94273 94273 94271 94273 94273 94271 94270 94273 94273 94272 94272 94273 94274 94271 94271 94272 94272 94273 94272 94272 94272 94272 94273 94272 94272 94271 94271 94271 94272 94273 94271 94271 94271 94273 94272 94272 94274 94275 94270 94273 94272 94269 ...

result:

ok n=500000, m=499999, k=123901

Test #39:

score: 0
Accepted
time: 612ms
memory: 95328kb

input:

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

output:

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

result:

ok n=500000, m=499999, k=10

Test #40:

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

input:

1 0 1
1

output:

1

result:

ok n=1, m=0, k=1

Test #41:

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

input:

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

output:

1 4 3 2 3 4 3 1 4 3

result:

ok n=10, m=16, k=4

Test #42:

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

input:

1000 9000 6
3 4 2 5 4 3 1 6 2 6 1 4 5 1 3 2 5 3 4 6 1 4 4 5 5 1 2 2 6 1 3 5 3 6 1 2 2 4 6 2 5 2 3 1 4 4 3 5 5 4 2 3 1 2 4 6 3 2 1 6 5 1 4 4 6 6 4 1 5 5 6 3 2 4 2 1 1 2 4 6 5 5 1 5 1 1 4 3 6 6 4 3 5 4 2 5 6 6 1 6 1 1 4 5 5 4 1 1 6 1 4 3 5 1 5 6 2 4 2 5 6 4 3 6 1 3 1 1 2 5 6 5 1 5 4 1 6 4 5 6 4 3 6 2 ...

output:

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

result:

ok n=1000, m=9000, k=6

Test #43:

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

input:

10000 320000 15
12 13 4 9 5 1 5 5 6 7 6 10 9 10 6 9 4 9 9 7 14 6 11 11 2 6 14 8 11 11 8 4 13 9 11 4 3 15 15 11 5 11 4 15 12 6 2 7 9 12 12 8 12 3 10 4 12 14 10 12 1 8 6 1 15 8 14 15 6 5 7 2 7 4 15 4 12 2 12 7 2 3 12 3 2 9 4 5 2 14 10 12 4 8 9 10 5 14 6 6 7 7 10 5 6 3 14 15 7 8 1 11 14 11 4 1 2 6 4 15...

output:

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

result:

ok n=10000, m=320000, k=15

Test #44:

score: 0
Accepted
time: 431ms
memory: 422360kb

input:

100000 500000 98
77 62 32 77 73 14 30 8 35 27 26 30 71 93 98 11 53 39 69 98 31 67 19 13 9 62 41 27 78 81 79 33 57 61 81 97 29 23 63 77 71 98 51 68 74 64 68 46 48 90 18 58 91 1 69 76 45 92 4 41 97 65 54 51 38 85 76 37 98 51 52 57 60 33 23 38 37 69 55 13 6 28 32 48 56 19 81 1 70 56 77 56 3 26 6 91 6 5...

output:

77 62 32 77 73 14 30 8 35 27 26 30 71 93 98 11 53 39 69 98 31 67 19 13 9 62 41 27 78 81 79 33 57 61 81 97 29 23 63 77 77 18 56 77 23 8 70 59 51 4 24 66 98 12 76 89 56 97 11 52 6 97 60 64 47 20 93 59 44 66 60 57 78 53 30 50 63 77 58 31 39 29 57 62 74 26 25 6 70 10 77 59 32 29 8 17 11 67 23 21 51 36 7...

result:

ok n=100000, m=500000, k=98

Test #45:

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

input:

400 797 3
3 1 2 2 1 2 1 1 2 3 3 2 2 3 1 3 1 3 2 3 1 1 3 2 3 1 3 1 1 2 3 3 1 2 3 1 2 3 3 1 1 2 1 1 3 2 2 2 3 2 3 2 1 2 1 1 3 2 2 3 3 2 3 1 2 1 3 3 1 2 1 2 2 3 2 3 1 3 1 3 2 2 1 3 2 3 1 2 3 3 2 1 1 3 1 3 3 1 1 2 3 1 3 3 2 3 3 1 1 3 3 1 1 2 2 3 3 3 1 2 2 2 1 3 2 1 3 1 2 3 2 1 3 3 3 1 1 1 2 3 3 1 3 1 3 ...

output:

3 1 2 2 1 2 1 1 2 3 3 2 2 3 1 3 1 3 2 3 1 1 3 2 3 1 3 1 1 2 3 3 1 2 3 1 2 3 3 1 1 2 1 1 3 2 2 2 3 2 3 2 1 2 1 1 3 2 2 3 3 2 3 1 2 1 3 3 1 2 1 2 2 3 2 3 1 3 1 3 2 2 1 3 2 3 1 2 3 3 2 1 1 3 1 3 3 1 1 2 3 1 3 3 2 3 3 1 1 3 3 1 1 2 2 3 3 3 1 2 2 2 1 3 2 1 3 1 2 3 2 1 3 3 3 1 1 1 2 3 3 1 3 1 3 2 3 2 3 2 ...

result:

ok n=400, m=797, k=3

Test #46:

score: 0
Accepted
time: 348ms
memory: 260392kb

input:

100000 500000 123
113 5 99 17 73 68 79 118 51 112 17 89 44 29 112 35 120 43 28 34 84 71 74 10 5 67 33 42 29 120 107 67 94 63 82 77 85 18 18 122 87 100 102 70 97 31 32 82 26 101 71 16 112 28 60 108 55 93 23 44 93 81 11 42 43 5 5 1 99 101 6 76 115 115 121 10 82 47 120 59 73 40 81 62 66 69 81 81 90 57 ...

output:

114 6 99 18 73 68 79 119 51 113 18 89 45 30 113 36 121 44 29 35 84 71 74 11 6 67 34 43 30 121 107 67 94 63 82 77 85 19 19 123 87 100 102 70 97 32 33 82 27 101 71 17 113 29 60 108 55 93 24 45 93 81 12 43 44 6 6 2 99 101 7 76 116 116 122 11 82 48 121 59 73 41 81 62 66 69 81 81 90 57 123 87 79 54 27 26...

result:

ok n=100000, m=500000, k=123

Test #47:

score: -100
Memory Limit Exceeded

input:

100000 500000 7
3 4 2 6 5 7 2 4 3 4 1 6 2 2 4 3 2 6 1 4 1 3 5 6 1 4 1 2 6 6 1 4 4 2 4 4 3 1 7 2 7 1 6 4 6 5 3 7 3 1 5 4 5 2 4 1 1 5 2 6 1 6 4 2 2 2 5 4 3 6 1 2 5 1 2 5 1 2 5 5 6 6 1 4 1 2 5 5 7 5 1 7 3 4 2 2 7 6 1 7 3 2 2 1 5 1 4 1 4 5 2 6 3 6 2 5 4 5 2 3 1 7 4 1 5 4 7 1 2 4 5 2 5 3 5 2 1 7 3 5 3 4 ...

output:


result: