QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#196617#3098. Ancient MachineDitaMirika#5 36ms10612kbC++201.4kb2023-10-01 20:25:572024-07-04 02:15:02

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

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

output:

45
010101001011000000000000000000000000000000000

input:

45
010101001011000000000000000000000000000000000

output:

0 45 3

result:

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

Test #2:

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

input:

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

output:

45
001101100010100000000000000000000000000000000

input:

45
001101100010100000000000000000000000000000000

output:

0 45 3

result:

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

Test #3:

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

input:

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

output:

45
110000001100100000000000000000000000000000000

input:

45
110000001100100000000000000000000000000000000

output:

0 45 2

result:

ok n = 18, D = 45, 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:

45
110111100010100000000000000000000000000000000

input:

45
110111100010100000000000000000000000000000000

output:

0 45 2

result:

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

Test #5:

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

input:

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

output:

45
000110011011100000000000000000000000000000000

input:

45
000110011011100000000000000000000000000000000

output:

0 45 5

result:

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

Test #6:

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

input:

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

output:

45
101110011000010000000000000000000000000000000

input:

45
101110011000010000000000000000000000000000000

output:

0 45 2

result:

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

Test #7:

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

input:

3
X Y Z

output:

45
111000000000000000000000000000000000000000000

input:

45
111000000000000000000000000000000000000000000

output:

0 45 1

result:

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

Test #8:

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

input:

3
Z Y X

output:

45
101000000000000000000000000000000000000000000

input:

45
101000000000000000000000000000000000000000000

output:

0 45 0

result:

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

Test #9:

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

input:

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

output:

45
010000000000000000000000000000000000000000000

input:

45
010000000000000000000000000000000000000000000

output:

0 45 0

result:

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

Test #10:

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

input:

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

output:

45
000000000000000000000000000000000000000000000

input:

45
000000000000000000000000000000000000000000000

output:

0 45 0

result:

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

Test #11:

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

input:

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

output:

45
000000000000000000000000000000000000000000000

input:

45
000000000000000000000000000000000000000000000

output:

0 45 0

result:

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

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 96
Acceptable Answer
time: 34ms
memory: 10396kb

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:

71460
001101010101011011101011000000111010101101000110011100010010110101101011101100000010111100001110101000001101100000111111010001101110010111010111011000010111010001000101110011110110110101010000100111111111100110010000010100110100101000001000100111011000011001011000101010100100101000110000110100...

input:

71460
001101010101011011101011000000111010101101000110011100010010110101101011101100000010111100001110101000001101100000111111010001101110010111010111011000010111010001000101110011110110110101010000100111111111100110010000010100110100101000001000100111011000011001011000101010100100101000110000110100...

output:

0 71460 22133

result:

points 0.96842105260 n = 100000, D = 71460, L = 22133

Test #13:

score: 96
Acceptable Answer
time: 36ms
memory: 10612kb

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:

71460
000011000011011010100000001100011011000111000100111010110100100001010111101000111110010100110000000111000111000100111100110010100100110100111110010000110111111010010111010100111100000111110100010000101000001111101010110000101100101111111001010001001001100100110001001010000101110000010100011001...

input:

71460
000011000011011010100000001100011011000111000100111010110100100001010111101000111110010100110000000111000111000100111100110010100100110100111110010000110111111010010111010100111100000111110100010000101000001111101010110000101100101111111001010001001001100100110001001010000101110000010100011001...

output:

0 71460 22275

result:

points 0.96842105260 n = 100000, D = 71460, L = 22275

Test #14:

score: 0
Wrong Answer
time: 26ms
memory: 10384kb

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:

71460
011001110100010000110010000111001000110111000001101100011010000000000000011011001111101100111101000100010000010010100110000010100010000010011110011101000011100000011101100000101000100010000011100010100110010101001110100110110010111010000110011010001000100011010110000001010111011111010100110010...

input:

71460
011001110100010000110010000111001000110111000001101100011010000000000000011011001111101100111101000100010000010010100110000010100010000010011110011101000011100000011101100000101000100010000011100010100110010101001110100110110010111010000110011010001000100011010110000001010111011111010100110010...

output:

0 71460 11061

result:

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