QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#104054#6339. CookiesBeyondHeaven12 7ms11560kbC++172.4kb2023-05-08 13:47:562023-05-08 13:48:01

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Dangerous Syscalls

Test #1:

score: 6
Accepted
time: 2ms
memory: 3372kb

input:

1
1
1
1

output:

1
1 1 

result:

ok good!

Test #2:

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

input:

2
1 1
1
1

output:

2
1 1 
1 2 

result:

ok good!

Test #3:

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

input:

2
1 1
1
2

output:

1
2 2 1 

result:

ok good!

Test #4:

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

input:

2
1 1
2
1 2

output:

1
2 2 1 

result:

ok good!

Test #5:

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

input:

4
1 1 1 1
2
2 3

output:

2
2 3 1 
2 4 2 

result:

ok good!

Test #6:

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

input:

8
1 1 1 1 1 1 1 1
3
1 4 5

output:

2
4 7 5 3 1 
4 8 6 4 2 

result:

ok good!

Test #7:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

500
1 329 
1 344 
1 343 
1 342 
1 341 
1 340 
1 339 
1 338 
1 337 
1 336 
1 335 
1 334 
1 333 
1 332 
1 331 
1 330 
1 345 
1 328 
1 327 
1 326 
1 325 
1 324 
1 323 
1 322 
1 321 
1 320 
1 319 
1 318 
1 317 
1 316 
1 315 
1 314 
1 360 
1 375 
1 374 
1 373 
1 372 
1 371 
1 370 
1 369 
1 368 
1 367 
1 ...

result:

ok good!

Test #8:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

1
500 158 159 160 161 162 163 164 165 166 167 168 169 170 171 1 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 172 127 128 129 130 131 132 133 134 135 136 137 138 139 140 157 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 141 221 222 223 224 225 226 227 228 229 230 231 232 ...

result:

ok good!

Test #9:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

2
250 159 161 163 165 167 169 171 173 175 177 179 181 183 185 187 127 129 131 133 135 137 139 157 143 145 147 149 151 153 155 141 222 224 226 228 230 232 234 236 238 240 242 244 246 248 250 189 191 193 195 197 199 201 203 205 207 209 211 213 215 217 219 33 35 37 39 41 43 45 126 49 51 53 55 57 59 61 ...

result:

ok good!

Test #10:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

-1

result:

ok no solution

Test #11:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

11
45 173 184 133 144 155 229 240 235 199 210 33 44 55 4 15 26 100 111 122 70 81 92 415 426 437 386 397 471 482 493 441 452 463 286 376 308 257 268 279 353 364 375 323 334 329 
45 1 183 132 143 154 228 239 250 198 209 204 43 54 3 14 25 99 63 121 69 80 91 414 425 436 385 396 391 481 492 440 451 462 2...

result:

ok good!

Test #12:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

250
2 79 329 
2 94 344 
2 93 343 
2 92 342 
2 91 341 
2 90 340 
2 89 339 
2 88 338 
2 87 337 
2 86 336 
2 85 335 
2 84 334 
2 83 333 
2 82 332 
2 81 331 
2 80 330 
2 95 345 
2 78 328 
2 77 327 
2 76 326 
2 75 325 
2 74 324 
2 73 323 
2 72 322 
2 71 321 
2 70 320 
2 69 319 
2 68 318 
2 67 317 
2 66 3...

result:

ok good!

Test #13:

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

input:

484
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

22
22 174 136 219 241 202 42 4 26 109 70 76 416 378 461 483 444 284 246 268 351 312 318 
22 173 135 218 240 201 41 3 25 108 69 91 415 377 460 482 443 283 245 267 350 311 333 
22 172 134 217 239 200 40 2 24 61 68 90 414 376 459 481 442 282 244 266 303 310 332 
22 171 133 216 238 199 39 46 23 106 67 8...

result:

ok good!

Test #14:

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

input:

495
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

55
9 150 204 12 67 431 486 293 348 325 
9 149 203 11 66 430 485 292 347 340 
9 148 202 10 65 429 484 291 346 339 
9 147 217 9 64 428 483 290 345 338 
9 146 200 8 109 427 482 289 344 337 
9 145 199 7 124 426 481 288 343 336 
9 144 198 6 123 425 434 287 342 335 
9 143 197 5 122 424 479 286 263 334 
9 ...

result:

ok good!

Test #15:

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

input:

500
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

4
125 161 165 169 173 177 181 185 127 131 135 139 143 147 151 155 222 226 230 234 238 242 246 250 191 195 199 203 207 211 215 219 35 39 43 126 51 55 59 47 5 9 13 17 21 25 29 96 100 104 108 112 116 120 124 65 69 73 77 81 85 89 93 409 413 417 421 425 429 433 437 379 383 387 407 395 399 403 391 474 478...

result:

ok good!

Test #16:

score: 0
Accepted
time: 6ms
memory: 9332kb

input:

499
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

27
17 224 189 216 56 21 111 75 413 378 405 495 459 298 263 353 317 328 
17 223 234 215 55 20 63 74 412 377 404 494 458 297 262 352 316 343 
17 222 249 214 54 19 109 73 411 376 403 493 457 375 261 351 315 342 
17 221 248 213 53 18 108 72 410 421 402 492 456 295 260 350 314 341 
17 220 247 212 52 17 1...

result:

ok good!

Test #17:

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

input:

499
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

19
17 104 123 95 409 428 385 404 486 442 461 292 311 268 350 369 325 328 
23 243 199 217 48 4 22 103 122 78 408 427 384 403 485 441 460 291 310 267 349 368 324 343 
27 174 129 146 225 242 198 216 126 3 21 102 121 77 407 426 383 402 437 440 459 290 309 266 348 367 323 342 
27 173 128 145 224 241 197 ...

result:

ok good!

Test #18:

score: 0
Accepted
time: 4ms
memory: 9196kb

input:

499
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

7
64 153 222 229 236 243 234 195 202 209 216 36 43 50 57 2 9 32 23 30 100 107 114 121 65 72 95 86 93 411 418 425 432 377 384 391 398 405 475 482 489 496 440 447 454 461 468 287 294 301 308 253 260 267 274 265 351 358 365 372 316 323 330 337 328 
64 152 221 228 235 242 249 194 201 208 215 35 42 49 56...

result:

ok good!

Test #19:

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

input:

499
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

4
56 436 378 382 386 406 394 398 402 390 473 477 481 485 489 493 497 438 442 446 450 454 458 462 466 282 286 290 294 298 302 306 310 252 256 260 264 268 272 276 280 347 351 355 312 363 367 371 359 316 320 324 344 332 336 340 328 
56 435 377 381 385 389 393 397 401 405 472 476 480 437 488 492 496 484...

result:

ok good!

Test #20:

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

input:

499
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

2
213 232 188 236 238 240 242 244 246 248 234 190 192 194 196 198 200 202 204 206 208 210 212 214 216 218 33 35 37 39 41 43 45 126 49 51 53 55 57 59 61 47 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 96 98 100 102 104 106 108 63 112 114 116 118 120 122 124 110 65 67 69 71 73 75 77 95 81 83 85 87 89 91 9...

result:

ok good!

Test #21:

score: -6
Dangerous Syscalls

input:

499
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:


result:


Subtask #2:

score: 0
Runtime Error

Test #28:

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

input:

1
15
1
1

output:

15
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 

result:

ok good!

Test #29:

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

input:

1
500
1
1

output:

500
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1...

result:

ok good!

Test #30:

score: -7
Runtime Error

input:

1
3000
1
1

output:


result:


Subtask #3:

score: 12
Accepted

Test #45:

score: 12
Accepted
time: 2ms
memory: 5460kb

input:

2
7 8
2
1 2

output:

8
1 2 
2 1 2 
2 1 2 
2 1 2 
2 1 2 
2 1 2 
2 1 2 
2 1 2 

result:

ok good!

Test #46:

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

input:

3
5 4 6
2
2 3

output:

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

result:

ok good!

Test #47:

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

input:

3
4 2 9
3
1 2 3

output:

9
1 3 
1 3 
1 3 
2 1 3 
2 1 3 
2 1 3 
2 1 3 
2 2 3 
2 2 3 

result:

ok good!

Test #48:

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

input:

4
3 5 4 3
2
3 4

output:

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

result:

ok good!

Test #49:

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

input:

4
1 4 5 5
3
1 3 4

output:

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

result:

ok good!

Test #50:

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

input:

4
3 3 6 3
3
2 3 4

output:

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

result:

ok good!

Test #51:

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

input:

5
4 3 3 3 1
3
2 4 5

output:

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

result:

ok good!

Test #52:

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

input:

5
4 3 3 3 2
3
3 4 5

output:

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

result:

ok good!

Test #53:

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

input:

5
4 4 4 2 1
3
2 4 5

output:

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

result:

ok good!

Test #54:

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

input:

5
3 3 3 3 3
3
1 2 4

output:

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

result:

ok good!

Test #55:

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

input:

6
3 3 3 2 2 2
3
2 4 6

output:

-1

result:

ok no solution

Test #56:

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

input:

6
3 3 3 2 2 2
3
2 5 6

output:

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

result:

ok good!

Test #57:

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

input:

6
4 4 3 2 1 1
3
1 3 5

output:

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

result:

ok good!

Test #58:

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

input:

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

output:

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

result:

ok good!

Test #59:

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

input:

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

output:

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

result:

ok good!

Test #60:

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

input:

7
4 4 3 1 1 1 1
3
1 4 6

output:

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

result:

ok good!

Test #61:

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

input:

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

output:

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

result:

ok good!

Test #62:

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

input:

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

output:

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

result:

ok good!

Test #63:

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

input:

8
4 3 3 1 1 1 1 1
4
1 6 7 8

output:

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

result:

ok good!

Test #64:

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

input:

9
4 3 2 1 1 1 1 1 1
4
3 4 5 7

output:

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

result:

ok good!

Test #65:

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

input:

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

output:

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

result:

ok good!

Test #66:

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

input:

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

output:

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

result:

ok good!

Test #67:

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

input:

4
2 2 2 1
2
1 4

output:

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

result:

ok good!

Subtask #4:

score: 0
Skipped

Dependency #1:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

0%