QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#408487#4303. New LevelLittle09TL 544ms146932kbC++142.6kb2024-05-10 14:41:142024-05-10 14:41:16

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 7ms
memory: 74096kb

input:

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

output:

2 3 4 1 

result:

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

Test #2:

score: 0
Accepted
time: 16ms
memory: 73896kb

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: 12ms
memory: 74068kb

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:

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

result:

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

Test #4:

score: 0
Accepted
time: 7ms
memory: 74232kb

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:

16 17 16 18 15 16 17 16 15 16 17 16 17 19 18 17 16 15 18 15 15 14 17 15 18 17 15 19 18 19 17 14 16 19 16 17 17 17 19 14 16 16 18 17 15 18 17 17 15 16 17 15 15 18 16 17 17 17 16 13 18 16 18 17 17 18 20 17 15 17 16 17 16 17 18 18 16 16 17 19 18 15 15 16 17 17 17 18 16 18 14 15 17 14 16 16 16 15 15 17 ...

result:

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

Test #5:

score: 0
Accepted
time: 12ms
memory: 73956kb

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: 19ms
memory: 74640kb

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:

159 158 158 157 158 159 157 157 157 156 156 158 157 157 160 158 155 159 156 155 154 154 158 158 154 156 157 156 155 157 158 153 157 154 159 157 155 154 157 158 156 157 156 158 154 157 154 159 155 157 158 158 157 156 158 157 156 159 160 153 156 159 155 157 154 153 156 158 155 159 158 156 158 153 156 ...

result:

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

Test #7:

score: 0
Accepted
time: 21ms
memory: 74624kb

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:

9 10 11 12 11 12 11 12 13 14 15 14 15 14 13 14 13 12 11 10 11 10 9 10 11 12 11 12 11 10 9 10 11 12 13 14 13 12 13 12 13 14 13 12 13 14 13 14 15 16 15 16 17 18 17 18 17 16 17 16 15 16 15 14 13 14 13 14 15 14 15 14 13 14 13 12 11 10 11 10 11 12 13 14 13 14 13 12 13 14 15 14 13 14 15 16 17 18 17 16 17 ...

result:

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

Test #8:

score: 0
Accepted
time: 92ms
memory: 87740kb

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:

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

result:

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

Test #9:

score: 0
Accepted
time: 63ms
memory: 86804kb

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:

45 46 45 46 47 48 47 46 47 46 45 46 47 48 49 48 47 46 45 46 45 46 47 46 45 44 45 44 43 44 43 42 41 42 41 42 43 44 45 44 45 46 45 44 45 44 43 44 43 42 43 42 43 44 45 46 47 46 45 46 45 46 45 44 45 44 43 42 41 42 41 42 43 42 43 44 45 44 45 44 45 46 47 46 47 46 45 46 47 46 45 46 45 44 45 46 45 44 45 46 ...

result:

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

Test #10:

score: 0
Accepted
time: 272ms
memory: 107932kb

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:

15 16 14 13 14 15 16 15 17 12 15 15 16 14 14 16 17 16 13 15 13 13 15 15 15 16 14 16 15 13 17 14 15 13 14 16 13 14 15 17 16 14 14 14 18 14 15 13 15 15 16 14 14 13 16 13 14 15 15 15 14 13 15 14 13 17 15 16 12 13 14 14 15 16 16 15 16 14 13 15 14 15 15 14 18 15 14 14 16 15 13 13 14 14 15 15 15 13 16 16 ...

result:

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

Test #11:

score: 0
Accepted
time: 72ms
memory: 83988kb

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:

270 271 271 272 273 272 270 270 269 269 274 271 268 271 270 273 268 271 274 273 272 270 271 273 268 272 270 269 271 270 271 273 273 270 274 272 275 269 269 273 268 271 272 270 274 270 270 269 270 275 271 272 269 275 271 269 268 269 269 270 273 273 272 270 270 272 269 270 273 272 268 274 272 274 270 ...

result:

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

Test #12:

score: 0
Accepted
time: 544ms
memory: 146932kb

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:

57 56 55 56 56 55 54 53 54 54 55 54 55 53 56 55 55 55 52 55 53 54 56 54 54 55 53 52 55 54 54 55 54 58 55 53 55 55 51 51 54 56 53 54 54 53 52 54 55 55 55 54 55 53 54 57 56 54 55 52 55 54 54 53 53 52 53 57 53 53 55 56 56 54 56 55 54 57 55 55 54 53 53 52 54 53 52 54 52 54 53 53 52 54 54 53 53 53 55 54 ...

result:

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

Test #13:

score: 0
Accepted
time: 15ms
memory: 74092kb

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: 11ms
memory: 73920kb

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: 7ms
memory: 73984kb

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: 7ms
memory: 74040kb

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: 48ms
memory: 78192kb

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: 4ms
memory: 74352kb

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: 17ms
memory: 73924kb

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: 59ms
memory: 78200kb

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: 15ms
memory: 74052kb

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: 19ms
memory: 74064kb

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: 19ms
memory: 74872kb

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: 55ms
memory: 78132kb

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: 45ms
memory: 78564kb

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: 11ms
memory: 73888kb

input:

1 0 1
1

output:

1 

result:

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

Test #27:

score: 0
Accepted
time: 11ms
memory: 74044kb

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: 16ms
memory: 74048kb

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: 3ms
memory: 73988kb

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:

2 3 4 1 4 1 4 3 4 1 

result:

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

Test #30:

score: 0
Accepted
time: 11ms
memory: 74544kb

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:

18 25 29 23 32 13 34 5 26 19 40 22 7 11 18 50 15 49 24 40 18 57 22 18 42 14 11 20 14 5 28 25 41 22 47 23 21 49 38 47 35 47 40 33 24 41 2 16 34 11 32 33 50 11 11 4 23 27 24 48 41 33 15 8 23 6 45 50 46 3 40 39 49 98 7 32 36 39 51 28 98 48 46 7 17 6 27 19 44 4 100 8 25 48 57 30 7 35 23 11 14 28 33 99 3...

result:

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

Test #31:

score: 0
Accepted
time: 11ms
memory: 73992kb

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: 116ms
memory: 91824kb

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:

835 922 987 992 781 902 896 30 991 11 988 812 969 64 773 886 871 959 805 868 24 980 987 987 70 843 930 862 870 798 10 837 29 897 877 853 786 963 925 860 756 852 31 46 836 936 939 983 870 12 813 827 768 887 818 942 25 984 34 937 4 956 858 932 828 16 22 955 988 43 837 914 885 957 888 941 887 25 837 35...

result:

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

Test #33:

score: -100
Time Limit Exceeded

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:


result: