QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#196610#3098. Ancient MachineT0m665 40ms10624kbC++201.4kb2023-10-01 20:16:552023-10-01 20:16:56

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

18
Y X Y Z X Z X X Z Z Y Y Z Y Y Z X X

output:

60
110001000001000000000000000000000000000000000000000000000000

input:

60
110001000001000000000000000000000000000000000000000000000000

output:

0 60 3

result:

ok n = 18, D = 60, L = 3

Test #2:

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

input:

18
X Z X Y Y Y X Z X Y Z Z Z Z Y Z Z Y

output:

60
111110010011000000000000000000000000000000000000000000000000

input:

60
111110010011000000000000000000000000000000000000000000000000

output:

0 60 3

result:

ok n = 18, D = 60, L = 3

Test #3:

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

input:

18
Y Z Z Y Z X X Z Y Y Z Z Z Y X X Z Y

output:

60
000000111101000000000000000000000000000000000000000000000000

input:

60
000000111101000000000000000000000000000000000000000000000000

output:

0 60 2

result:

ok n = 18, D = 60, L = 2

Test #4:

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

input:

18
X Z Z X Z X X Z X Y Y X X Z X Y Z X

output:

60
000101010011000000000000000000000000000000000000000000000000

input:

60
000101010011000000000000000000000000000000000000000000000000

output:

0 60 2

result:

ok n = 18, D = 60, L = 2

Test #5:

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

input:

18
X Y X Y Y X X Z Y Z Y X Z Y Y X X Z

output:

60
010100100100100000000000000000000000000000000000000000000000

input:

60
010100100100100000000000000000000000000000000000000000000000

output:

0 60 5

result:

ok n = 18, D = 60, L = 5

Test #6:

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

input:

18
X X Y Z X Y Y Y X X Z X X X Z X Z Z

output:

60
011000110010100000000000000000000000000000000000000000000000

input:

60
011000110010100000000000000000000000000000000000000000000000

output:

0 60 2

result:

ok n = 18, D = 60, L = 2

Test #7:

score: 100
Accepted
time: 0ms
memory: 3832kb

input:

3
X Y Z

output:

60
001000000000000000000000000000000000000000000000000000000000

input:

60
001000000000000000000000000000000000000000000000000000000000

output:

0 60 1

result:

ok n = 3, D = 60, L = 1

Test #8:

score: 100
Accepted
time: 0ms
memory: 3860kb

input:

3
Z Y X

output:

60
110000000000000000000000000000000000000000000000000000000000

input:

60
110000000000000000000000000000000000000000000000000000000000

output:

0 60 0

result:

ok n = 3, D = 60, L = 0

Test #9:

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

input:

18
X X X X X X X X X X X X X X X X X X

output:

60
100000000000000000000000000000000000000000000000000000000000

input:

60
100000000000000000000000000000000000000000000000000000000000

output:

0 60 0

result:

ok n = 18, D = 60, L = 0

Test #10:

score: 100
Accepted
time: 0ms
memory: 4108kb

input:

18
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

output:

60
000000000000000000000000000000000000000000000000000000000000

input:

60
000000000000000000000000000000000000000000000000000000000000

output:

0 60 0

result:

ok n = 18, D = 60, L = 0

Test #11:

score: 100
Accepted
time: 0ms
memory: 4116kb

input:

18
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z

output:

60
000000000000000000000000000000000000000000000000000000000000

input:

60
000000000000000000000000000000000000000000000000000000000000

output:

0 60 0

result:

ok n = 18, D = 60, L = 0

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 100
Accepted
time: 24ms
memory: 10624kb

input:

100000
X Z X Z Z X Y Z Y X Y X Z Z Z Y X Z Y X Y Y X Y Y Y Z Y Z Z Y X X Y X X Y Y X X X Z Y Y Y Z Z Z Z Y X Y Y Z Z Z X Y Z X X X X Y X Y X X Z X Z Z Z X Y X X X Z X Z X X X Y Y Y Y Z X X Y Z Y Y X Z X Z Z Z Z Z Y Z Y X Y Y Y Y X Z Z Y Z Z Y Z Z Z X Z Z X X Z Z Z Z X X Z Y Y Z Y Y Z Z Y Y Z Y Z Y Z...

output:

69780
100011101111001001000111010100101010111000001010010011001000001001011010000011101111001001001101001000100100110111111010010010100011100100110110100101010111011101001101001100100110100110100000111000000111101000101011101011011000101111101000011111101100010000111001101100111011100000111001111001...

input:

69780
100011101111001001000111010100101010111000001010010011001000001001011010000011101111001001001101001000100100110111111010010010100011100100110110100101010111011101001101001100100110100110100000111000000111101000101011101011011000101111101000011111101100010000111001101100111011100000111001111001...

output:

0 69780 22133

result:

points 1.0 n = 100000, D = 69780, L = 22133

Test #13:

score: 100
Accepted
time: 40ms
memory: 10496kb

input:

100000
Z X X Y Z Z Z Y Z X Y Y Z X X Z Z Z Y Z X Y X Y X Z Y X Z X Y X Y Y Z X X Z X Z Y Z Y Z Z Z Y X Z X Z Y Y Y Z Y Z Y Z X Y X Z Z X Y X Y Z X Y Z Y X Y X X Z Z X Z X X Z X X X X Y X X Z Z X Y Y Y Y X Y X X Z Y Z Y Y Z X X Z Z Y Y X Z Y Y X Y Z Y Z Y Y Z Z X Z Y Z Z Z X Y Z Z X X X X Z Y X Y Y Z...

output:

69780
111100100110100101110110000001100101101101011100110100110010100110001011000110011111010101000100101100101001011010000000100010000110111001010100000000011011100110001011101011010010001110101011100001111110010000000100001010111110010011011100011110101011001101010001000111011000101100010100111001...

input:

69780
111100100110100101110110000001100101101101011100110100110010100110001011000110011111010101000100101100101001011010000000100010000110111001010100000000011011100110001011101011010010001110101011100001111110010000000100001010111110010011011100011110101011001101010001000111011000101100010100111001...

output:

0 69780 22275

result:

points 1.0 n = 100000, D = 69780, L = 22275

Test #14:

score: 0
Wrong Answer
time: 40ms
memory: 10396kb

input:

100000
X Z Y X Z X X Z Y Z Y Y Y Z Y Z X X Z X X Y Z X X Z Y X Y Y Z X Z Y Z X X X X Z X Y X Z X Z X X X Y X Y Z Z Z Z Z Z Z Z Y X Y Z X Z Y Z Y X Y Z Y Z Y X Y Z X Z Z Z Y X Y Y X X X X Y X X Y Z Z X Z Y Z Z Y X Y X Z Z Z X X Z X Z Z Z Z Y X Z Z X X Z Z Y X X Y Y Y X Y Y Y X X Y Y Z X Z Y Y X X Y Z...

output:

69780
011010100000001011110010101100101110011011101011011110011000000001100000001101110100010010011010000110100011011001100110011100110010000101101001100010011111111001010111010100101110011001001100110001101010101000110111001111101110011010010101011111111110001001000111010110010010110111111011100001...

input:

69780
011010100000001011110010101100101110011011101011011110011000000001100000001101110100010010011010000110100011011001100110011100110010000101101001100010011111111001010111010100101110011001001100110001101010101000110111001111101110011010010101011111111110001001000111010110010010110111111011100001...

output:

0 69780 11061

result:

wrong answer your query is valid but your solution is not optimal: read 11061 but expected 22177