QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#474502#3098. Ancient Machineegypt_ioi2024b_045 12ms9888kbC++203.0kb2024-07-12 19:22:232024-07-12 19:22:24

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

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

output:

32
01100011000100110011010110001100

input:

32
01100011000100110011010110001100

output:

0 32 3

result:

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

Test #2:

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

input:

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

output:

32
11111110100111000010100110101100

input:

32
11111110100111000010100110101100

output:

0 32 3

result:

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

Test #3:

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

input:

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

output:

32
10001100100010100000100011000000

input:

32
10001100100010100000100011000000

output:

0 32 2

result:

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

Test #4:

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

input:

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

output:

32
00111001100011101101101100001010

input:

32
00111001100011101101101100001010

output:

0 32 2

result:

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

Test #5:

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

input:

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

output:

32
00101001010101011111001001101100

input:

32
00101001010101011111001001101100

output:

0 32 5

result:

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

Test #6:

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

input:

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

output:

32
01101001110100000100010100110100

input:

32
01101001110100000100010100110100

output:

0 32 2

result:

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

Test #7:

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

input:

3
X Y Z

output:

32
00100100011100100101011011100010

input:

32
00100100011100100101011011100010

output:

0 32 1

result:

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

Test #8:

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

input:

3
Z Y X

output:

32
01011011010110001011110111001000

input:

32
01011011010110001011110111001000

output:

0 32 0

result:

ok n = 3, D = 32, 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:

32
01000110001011011100000000000000

input:

32
01000110001011011100000000000000

output:

0 32 0

result:

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

Test #10:

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

input:

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

output:

32
00000000000000000000000000000000

input:

32
00000000000000000000000000000000

output:

0 32 0

result:

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

32
00000000000000000000000000000000

input:

32
00000000000000000000000000000000

output:

0 32 0

result:

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

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 12ms
memory: 9888kb

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:

73812
111001001001011001001000101111001101100011101010000000011000000001101001011111111100110001000011011100010111100100111111100000111010111100101010010000011000111101001110101111101001111010011110000010111011100111010100001010010011010011110000101110000010010110111101010110011011000011111000100110...

input:

73812
111001001001011001001000101111001101100011101010000000011000000001101001011111111100110001000011011100010111100100111111100000111010111100101010010000011000111101001110101111101001111010011110000010111011100111010100001010010011010011110000101110000010010110111101010110011011000011111000100110...

output:

0 73812 21624

result:

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