QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#426815#3098. Ancient Machineegypt_ioi2024_045 42ms10808kbC++203.6kb2024-05-31 22:17:042024-05-31 22:17:04

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:

15
111010010011000

input:

15
111010010011000

output:

0 15 3

result:

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

Test #2:

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

input:

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

output:

15
100101000010100

input:

15
100101000010100

output:

0 15 3

result:

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

Test #3:

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

input:

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

output:

15
000111000100100

input:

15
000111000100100

output:

0 15 2

result:

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

Test #4:

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

input:

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

output:

15
001011000010100

input:

15
001011000010100

output:

0 15 2

result:

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

15
100101010100010

input:

15
100101010100010

output:

0 15 5

result:

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

Test #6:

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

input:

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

output:

15
011000110110010

input:

15
011000110110010

output:

0 15 2

result:

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

Test #7:

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

input:

3
X Y Z

output:

3
001

input:

3
001

output:

0 3 1

result:

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

Test #8:

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

input:

3
Z Y X

output:

3
110

input:

3
110

output:

0 3 0

result:

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

Test #9:

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

input:

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

output:

15
100000000000000

input:

15
100000000000000

output:

0 15 0

result:

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

15
000000000000000

input:

15
000000000000000

output:

0 15 0

result:

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

Test #11:

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

input:

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

output:

15
000000000000000

input:

15
000000000000000

output:

0 15 0

result:

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

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 89
Acceptable Answer
time: 26ms
memory: 10808kb

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:

75000
100011000110010000110010000000010000100101110000000100100110100000100100100110100000010100011000010011101110001110000001110000110110001000101110110110101000111010100110000111111010000100001000001110110000111010100010011000010010011110111000100111101010101000011101101010000100101000100010111110...

input:

75000
100011000110010000110010000000010000100101110000000100100110100000100100100110100000010100011000010011101110001110000001110000110110001000101110110110101000111010100110000111111010000100001000001110110000111010100010011000010010011110111000100111101010101000011101101010000100101000100010111110...

output:

0 75000 22133

result:

points 0.89473684210 n = 100000, D = 75000, L = 22133

Test #13:

score: 89
Acceptable Answer
time: 42ms
memory: 10564kb

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:

75000
010110100100111000010100110111010010001110001101000011000110011000000100000110011101101000001110100100100010110010000010010000000011010010011101000100010010100011010011111110101000110110010011101000110110100000100100001101110010000011110100000011010010000010000000001010010110110000100100000100...

input:

75000
010110100100111000010100110111010010001110001101000011000110011000000100000110011101101000001110100100100010110010000010010000000011010010011101000100010010100011010011111110101000110110010011101000110110100000100100001101110010000011110100000011010010000010000000001010010110110000100100000100...

output:

0 75000 22275

result:

points 0.89473684210 n = 100000, D = 75000, L = 22275

Test #14:

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

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:

75000
100011010111110110010110001101101010000000101101111101010010010000000101010100101110101101101000000000110100101000001111000010110000101110000000000101101110100001101010000000000110110101000010100001110010110000101010100010000110010101010000000111110111110101110110010110010010110000111101110010...

input:

75000
100011010111110110010110001101101010000000101101111101010010010000000101010100101110101101101000000000110100101000001111000010110000101110000000000101101110100001101010000000000110110101000010100001110010110000101010100010000110010101010000000111110111110101110110010110010010110000111101110010...

output:

0 75000 22176

result:

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