QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#104065#6339. CookiesBeyondHeaven0 126ms329440kbC++171.9kb2023-05-08 14:22:582023-05-08 14:23:00

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Memory Limit Exceeded

Test #1:

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

input:

1
1
1
1

output:

1
1 1 

result:

ok good!

Test #2:

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

input:

2
1 1
1
1

output:

2
1 1 
1 2 

result:

ok good!

Test #3:

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

input:

2
1 1
1
2

output:

1
2 2 1 

result:

ok good!

Test #4:

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

input:

2
1 1
2
1 2

output:

1
2 2 1 

result:

ok good!

Test #5:

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

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: 3800kb

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

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: -6
Memory Limit Exceeded

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:


result:


Subtask #2:

score: 0
Memory Limit Exceeded

Test #28:

score: 7
Accepted
time: 3ms
memory: 3868kb

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

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: 0
Accepted
time: 18ms
memory: 59880kb

input:

1
3000
1
1

output:

3000
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
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 #31:

score: 0
Accepted
time: 126ms
memory: 329440kb

input:

1
15000
1
1

output:

15000
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
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 #32:

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

input:

2
2 1
1
1

output:

3
1 1 
1 1 
1 2 

result:

ok good!

Test #33:

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

input:

2
1 2
1
2

output:

-1

result:

ok no solution

Test #34:

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

input:

3
1 2 3
1
2

output:

3
2 2 3 
2 2 3 
2 1 3 

result:

ok good!

Test #35:

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

input:

3
3 2 1
1
3

output:

-1

result:

ok no solution

Test #36:

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

input:

3
2 2 2
1
2

output:

3
2 2 1 
2 3 1 
2 3 2 

result:

ok good!

Test #37:

score: -7
Memory Limit Exceeded

input:

15
50 49 48 47 46 45 44 43 42 41 40 2 1 1 1
1
10

output:


result:


Subtask #3:

score: 0
Memory Limit Exceeded

Test #45:

score: 12
Accepted
time: 3ms
memory: 3932kb

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

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

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

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

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: 3876kb

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

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: 3920kb

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

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

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

input:

6
3 3 3 2 2 2
3
2 4 6

output:

-1

result:

ok no solution

Test #56:

score: -12
Memory Limit Exceeded

input:

6
3 3 3 2 2 2
3
2 5 6

output:


result:


Subtask #4:

score: 0
Skipped

Dependency #1:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

0%