QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#196586#3098. Ancient MachineDitaMirika#5 34ms10628kbC++201.5kb2023-10-01 19:49:442024-07-04 02:14:57

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 100
Accepted
time: 2ms
memory: 3852kb

input:

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

output:

60
010100101001110001001010011011011101000101100111100010001001

input:

60
010100101001110001001010011011011101000101100111100010001001

output:

0 60 3

result:

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

Test #2:

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

input:

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

output:

60
010011111110100101011111100000010000111000011100101110011111

input:

60
010011111110100101011111100000010000111000011100101110011111

output:

0 60 3

result:

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

Test #3:

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

input:

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

output:

60
111111011100001010101100101111001111110011101001101011001000

input:

60
111111011100001010101100101111001111110011101001101011001000

output:

0 60 2

result:

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

Test #4:

score: 100
Accepted
time: 2ms
memory: 3792kb

input:

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

output:

60
110101010000001111101010110100111010010011010110110000110111

input:

60
110101010000001111101010110100111010010011010110110000110111

output:

0 60 2

result:

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

Test #5:

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

input:

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

output:

60
000000111000001011010110110000100001010111011001010101111001

input:

60
000000111000001011010110110000100001010111011001010101111001

output:

0 60 5

result:

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

Test #6:

score: 100
Accepted
time: 2ms
memory: 3980kb

input:

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

output:

60
111001110011011110001111011100100010010101011011000000111101

input:

60
111001110011011110001111011100100010010101011011000000111101

output:

0 60 2

result:

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

Test #7:

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

input:

3
X Y Z

output:

60
110111011010110010111010011100101010000110101000010100001011

input:

60
110111011010110010111010011100101010000110101000010100001011

output:

0 60 1

result:

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

Test #8:

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

input:

3
Z Y X

output:

60
100110010000111111100100110011011011010111111001010110011100

input:

60
100110010000111111100100110011011011010111111001010110011100

output:

0 60 0

result:

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

Test #9:

score: 100
Accepted
time: 2ms
memory: 3864kb

input:

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

output:

60
010001001010001010101100110110011110101110101110111101101001

input:

60
010001001010001010101100110110011110101110101110111101101001

output:

0 60 0

result:

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

Test #10:

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

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

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: 0
Wrong Answer
time: 34ms
memory: 10628kb

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
010111001001001110001001111011110110100000101110110111110000001011100011011011000000001101100110110000100110011011000010100111111010010001010001011100111111110011100111110000011010110101001101110101110000001110110000010111110000011000001101101010001100110000110010001101001000001001110011101100...

input:

69780
010111001001001110001001111011110110100000101110110111110000001011100011011011000000001101100110110000100110011011000010100111111010010001010001011100111111110011100111110000011010110101001101110101110000001110110000010111110000011000001101101010001100110000110010001101001000001001110011101100...

output:

0 69780 22119

result:

wrong answer your query is valid but your solution is not optimal: read 22119 but expected 22133