QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#23530#2968. Team ChangeqwqAC ✓1572ms73064kbJava115.1kb2022-03-17 14:33:242022-04-30 03:24:36

详细

Test #1:

score: 100
Accepted
time: 94ms
memory: 46060kb

input:

5 4
AAABB
??AAA
1 4
2 4
3 4
3 5

output:

BBXAA

result:

ok good plan

Test #2:

score: 0
Accepted
time: 121ms
memory: 46156kb

input:

2 1
AB
AA
1 2

output:

XA

result:

ok good plan

Test #3:

score: 0
Accepted
time: 105ms
memory: 45548kb

input:

8 8
ABBABAAA
?B?ABBAB
1 2
4 3
6 5
4 5
1 5
2 8
3 7
2 4

output:

BXBAXBAB

result:

ok good plan

Test #4:

score: 0
Accepted
time: 177ms
memory: 46784kb

input:

200 10000
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

result:

ok good plan

Test #5:

score: 0
Accepted
time: 132ms
memory: 45676kb

input:

200 10000
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

result:

ok good plan

Test #6:

score: 0
Accepted
time: 157ms
memory: 46684kb

input:

200 10000
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

BXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXBXXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXA

result:

ok good plan

Test #7:

score: 0
Accepted
time: 160ms
memory: 46664kb

input:

200 10000
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
AAABAABBBBBBABBBABABBABBAABAABBABBABAAABBAAAAABBAAAABBAABAAAAABABAABABBABABBABBBABABAABAB...

output:

XXXBXXBBBBBBXBBBXBXBBXBBXXBXXBBXBBXBXXXBBXXXXXBBXXXXBBXXBXXXXXBXBXXBXBBXBXBBXBBBXBXBXXBXBXBBBXXBXXXXAXXAAAAAXXXAXAXXAXAAXXAAXXAAAAAAXXXXAAXXAXAXAXAXXAXXAAAXXAAAAAXAXAAAXXAXAAAXXXAAXAXAXXXXAXAXXAXAAAAX

result:

ok good plan

Test #8:

score: 0
Accepted
time: 166ms
memory: 46480kb

input:

200 10000
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
A?B?ABBA??A?B?AB?A?B?AA?B??BAAAB??BABBA???AABABBBBAAB?B?AABBBB?BBABAB?AB?AAABAB?AB??B?A?A...

output:

AAXAAXXAAAAAXAAXAAAXAAAAXAAXAAAXAAXAXXAAAAAAXAXXXXAAXAXAAAXXXXAXXAXAXAAXAAAAXAXAAXAAXAAAAXAXAXAAAAAAXBBXBBBBXBXBBXBXBXBXXBBBXXBBBXBBBBBBBBBBXXXBBBBBBXBBBBBBXBXXBXBBBBBBXBBBBXBBBBBBXXBBBBBBBXBXBXBXXXXB

result:

ok good plan

Test #9:

score: 0
Accepted
time: 99ms
memory: 45348kb

input:

1 0
A
A

output:

A

result:

ok good plan

Test #10:

score: 0
Accepted
time: 75ms
memory: 45632kb

input:

2 1
BA
BB
1 2

output:

XB

result:

ok good plan

Test #11:

score: 0
Accepted
time: 86ms
memory: 45644kb

input:

2 0
AA
BA

output:

BA

result:

ok good plan

Test #12:

score: 0
Accepted
time: 85ms
memory: 45340kb

input:

2 0
AB
B?

output:

BA

result:

ok good plan

Test #13:

score: 0
Accepted
time: 115ms
memory: 45652kb

input:

2 1
AB
B?
1 2

output:

BA

result:

ok good plan

Test #14:

score: 0
Accepted
time: 114ms
memory: 45580kb

input:

1 0
A
B

output:

B

result:

ok good plan

Test #15:

score: 0
Accepted
time: 87ms
memory: 45560kb

input:

1 0
A
?

output:

B

result:

ok good plan

Test #16:

score: 0
Accepted
time: 110ms
memory: 45664kb

input:

1 0
B
A

output:

A

result:

ok good plan

Test #17:

score: 0
Accepted
time: 72ms
memory: 45448kb

input:

1 0
B
B

output:

B

result:

ok good plan

Test #18:

score: 0
Accepted
time: 108ms
memory: 45656kb

input:

1 0
B
?

output:

A

result:

ok good plan

Test #19:

score: 0
Accepted
time: 90ms
memory: 45336kb

input:

2 0
AB
BA

output:

BA

result:

ok good plan

Test #20:

score: 0
Accepted
time: 96ms
memory: 45468kb

input:

2 1
AB
AB
1 2

output:

AB

result:

ok good plan

Test #21:

score: 0
Accepted
time: 74ms
memory: 45632kb

input:

2 1
AB
BA
1 2

output:

BA

result:

ok good plan

Test #22:

score: 0
Accepted
time: 807ms
memory: 73012kb

input:

1000 1000
ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

XAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXAXA...

result:

ok good plan

Test #23:

score: 0
Accepted
time: 161ms
memory: 72404kb

input:

1000 1000
ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

BXBABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABA...

result:

ok good plan

Test #24:

score: 0
Accepted
time: 104ms
memory: 70836kb

input:

1000 1000
ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

BABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABA...

result:

ok good plan

Test #25:

score: 0
Accepted
time: 799ms
memory: 72584kb

input:

1000 1000
ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

BXAXBXBXBAXBXABABAXXBABXBABXBAXABABXABAXAXABXABXAXBABABXAXBABAXAXXBAXAXAXXBAXBXBXBABAXBAXABAXBAXBAXAXAXAXAXBABXAXAXABAXABABAXABXBAXBXABABXBAXAXABXABXABXBXBXXABABABAXXBXBABXBAXABAXABXBABXXABABABXXABXBXABXAXABXBAXAXAXAXXBAXXBAXXBABABAXBXAXABXBABXBXXABXAXAXBXBABAXBXABXBABABAXBXABXBXBAXXBXBABABXAXBAXBXA...

result:

ok good plan

Test #26:

score: 0
Accepted
time: 599ms
memory: 73012kb

input:

1000 1000
ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

ABABABXABAXBABABXBAXBXBABAXABABABABXBABABAXABXABAXABABABABABXBXBABAXBABABXXABAXAXABABXBABXBAXABAXBABXBABXABABABABABXABABABAXABABABXBXBABABABABABXBABABAXABXBABAXBABXBAXABXBAXABABABABABXXABXBABABXBAXAXBABABABAXABABABABAXABABAXBABXBABABAXABAXABABAXABAXXBABXBABAXAXABAXABABABXBABAXABAXAXABAXABAXABXXABABA...

result:

ok good plan

Test #27:

score: 0
Accepted
time: 142ms
memory: 71912kb

input:

1000 0
BABAAABBBAABBBAABAAAAAABAAABBBBBBAAAAAAAAAABBBBABAABBBABABBBABBBBBABBABBAABAAAAABBAABABBBABBBBBABABAABBBBBAABBBBAAAABBBBABBABBABBBBABABABBBBABAABAAABBBABAABBAABABABAAAABBBABBBBBAAABABBAAAAABAABBBABBAABBBBABAAAABAAAAAAAAABBABBBAAABBBABBABABBAAAAABAABBBBBABBBABABABBABBBBABAAABBAABAABBAABBABAABB...

output:

ABBBBAABBAAABBBBAAABBABABBBBAABABBBABBABABBBBAABAABAAABBBBAABBBAABBAAAAABAAAABBBAABBAABAABBBBBBBBBABBAABABBBBBAABABBBAAABBBBAABBAAABAABBAAAAAABABBABABAABBABABAABBBAABBBAAABABAABBBAABAAABABABBBBABAAABAAAABABAABAABBBBBBBBBAABAAABBBAABBBBBAAAABBBBAABAAAAABAAABBABABAABBBAABBBABBABABBBBBBBABAABBAABABBAAB...

result:

ok good plan

Test #28:

score: 0
Accepted
time: 1446ms
memory: 72720kb

input:

1000 10000
ABAABBAAAABAABBBABABBABBBABBBBBBAABAAABBBBBABBAABBAAAAABBAABBBBABBBBAAABAAAABABBBBABBABAAABBBABBABAABBAABABBABAAAABABBABAABBBBBAAAAAAABAABABBABAAAAABBBBBABAABBAABBBABBBABBBBAABABABAAABAAABBABBABBBAAABBBBAABBAABABBBABBAAAABBAAABBAAAABBABBBABBBAABBBBAAAABAABABAAAAAABBBBBBBABBABBBBAAAABAAAAB...

output:

XXAAXBAAAABAXBXXAXABBAXXBXBXBBBBAXBAAABBXBBXXBAAXBXAXAXXXAABBBXXBBBXAXABAAAAXXBBBBAXXXBAAABXBABBXBAABBXXBXBBXXAXAABAXXABXABBBBBXAAAAXABXABXXBXXAXAXABBBBXABAABXAABBBAXBBXXBBBXXBABXBAAABAXABBABBAXBXAAXBBXBAAXBXABABBXXXXAXAABBXAABXAXAXBBXBXBAXXBAAXBBXXAAXXAAXAXAAXAAABBBBXBXXXXABBBXAAXABXAAAXBBBBBAABBBB...

result:

ok good plan

Test #29:

score: 0
Accepted
time: 1530ms
memory: 72880kb

input:

1000 10000
BAAABBBBAAABBBBAABABBABBBBBAAAABABABBBABAAABBABABBBABAABABBAABABAAABBAABBABBBBBBBBBBBBBABAAAABABBBBAAAABBABABABBAABAAABABBBAAAABBBAAABBBBBAAAAAABABBBBBBAABABBABAAABBABAAAAABBBBBBBABBAAAAABABBBAAABAABBBAABABBBBBBBABAABABABAAAAABBBBAABAAAABBBBAAAAABABBBABABBABBAAABBBABABABBABAAAAABBABAAABBB...

output:

BAAXBBXXAXABBXXAABXXXABBBBBAXAXXABABXXAXXXABXABAXBXAXAABABBAABAXXAAXBXABBABBXBBBBBBXBBXABXXXAXABBBBAAAXXBXBABXBBAAXAAABABBBXAAAXBBAAABBBXXXXAXAABABBBBBBAABXBBXXAAXXBABXXAXABXBXXXBABXAAAXABAXXBAAXBAXXXBAAXABBBXBBBABAXBXBABXAAAABBBBAABAXAABXBXAAXAABXBBBABAXBABXAXAXBXABABXBBXBAAAAXXXABXAAXXBBAAXXABAAAX...

result:

ok good plan

Test #30:

score: 0
Accepted
time: 1572ms
memory: 72588kb

input:

1000 10000
AAABABBBAABABBBBBBABBABAABBBAABBAAAAAAAABABBAABBAAABBAAAAAABBBAABAABBABAABAAABBAABABBBBBBBBAABABBABBBBABABBBAAAAABAABAAABBABAAABAAABBBAAABABBBBBBAABAABABABAABABABABAABAAABABBABBAABBAABBAAABABAABBAAAAABBBAAABBABBBABAABAAAAABABBBABBBBABAAABABBBBAABAABBBAAABAAABAABAAAABBBAAAABAABAAABBAABBBBA...

output:

XXBAXXAXBXXBAAXAXXXAABAXBAXABBXXBXBBBBBBABAABBAXBBXAAXBBBBXAXABBAXBXABABBAXXBAABXXBXAXXAAAABXABAABAAXXBXXAAABBBBBABBAXXBAXBABBBXBBBAAAXBBABAAAXAXBXABBABXBXXBABXBXBAXBXXBBXBAXBXABBAABBAABXBAXABXXXBBXBBAXAXBBXABXAABABBABBBXXXXAXAXAAAABABXXABXXAXBBABBAXXBBBAXXBABBAXBBXAAABXBXXBBAXXBXXBBAXXXBAXBAAXBBBAA...

result:

ok good plan

Test #31:

score: 0
Accepted
time: 1375ms
memory: 73064kb

input:

1000 10000
BBAAAABAAAABAABAABABAAAAABABBABBABABBAAABBABBBBAAAAABAAAABBABBBBAAABBBBBBBAAABAAABABAABBBABABABAABAAABBBBABBBBAAAABBAAABABABABBBABBABBBAAABABABABABAABBABBBABBAAAAAABBAAABABBBABAAAABBBBBBBBABAABBBBAABBBBBBAABBABBAABABBABAAABABBABBBBABBBBABBABAABBABBBBBBBABABABAAAABBBBBBAABBBBBABBABAABABBBB...

output:

AXXXBXABXBBAXBABBAXABXBXXAXXXBAAXABAABXXXAXAAXABBBXXXBBBBXABAXAAXBXXAXXAXABBBAXBXABXXBXAXBABABXBBABXBAAAAXAXAXBBXBAABBXXXAXXBAAABAABAXXBBBAXXXXXABXBBAABAAABAXXBXXBBAABBXABAAXXABBBBAXAXXAXXXXBBXXAAXBXAAXXABXAABXAXBAXAAXAXXXABXXXAAAAXAXAAXXABABBAXBXAAAAXABABABXXBXBAAXAAXBBAAAAAXAXBABBABXAXAXXAAABABBXB...

result:

ok good plan

Test #32:

score: 0
Accepted
time: 1477ms
memory: 73036kb

input:

1000 10000
AABAABBABBBAABAABABBAAAAAABAABABBAABAAAABBAABAABBBABBAABAABAABABBAABBABBAABAABBAABBAAAAAABAABBBBABABBBBABBBAAABBAAABBABBBAABBBBAABAAAAABBBBBABAABAABBABBBBBAAAABBAABAAAABBBABBAAAAABAAAABBAAAAABBAAABBABAABBBBBBABBABBABBAABABAABAAAABBBBAAAABBABBABBABBAAABAAAABBABABABBBBAABABBAAAABBAABABAAABB...

output:

XABAXBBABBXXAXAABXBBAAXXAABAABAXBAAXAAAXBBAAXAABXBAXBXXXXABAABXBXXABBXBXAAXAAXBAXXBAAAAAABAXBBXBXBABXBBXBBXAAABXAXXXBABXBAABBBBXABXAAAXBXBBBABAABXXBBABXBBXAAXABBAABXAAABXBABXAAAAXBAAAXBXAAXXAXBAAABBXBXXBBBBBBXXBAXBABXAAXAXXAXAAXABXBBAAAABBXBBAXBABXXXABAAAABXXBAXABBXXXABXBXXAAABBAXBXXAXABBBXXABXABXXX...

result:

ok good plan

Test #33:

score: 0
Accepted
time: 97ms
memory: 71268kb

input:

1000 999
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

result:

ok good plan

Test #34:

score: 0
Accepted
time: 122ms
memory: 71868kb

input:

1000 999
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

BBAAAAAABAABBBBAABBBBBBBAAAAABBABAABAABBAAABBBAABAABBBAAAABABBABBAXBBABAAABBABBBBAABAAAABAABBBABBBAABAABABBABABABAAABAABAAAABABBABBAABBABAABBBAAABAABABBABBAABBABABBAAABABBBAAABABBBABBBBABBAAABBAAABAAABABBAABBBBBBAABAAAABAABAAABAAAAABABAABABBABBAAAAAAABBBBBBBAAAAAAABABABAABBBBBAABABBBBBABBBBBBBBAABAB...

result:

ok good plan

Test #35:

score: 0
Accepted
time: 131ms
memory: 71760kb

input:

1000 999
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

AAAABAABAAABBBBBAAAAABAAAAAAAABABAABAABAABAAAABBBAAABAAABBABBAAAABXBAAABABABABABBAAAABBABBBAAABABBBBAAABABAABAABAAAAAAAAAAAABABABBBBAAABAAAABABABBBAABBBAAAABABABAABABAAABABBAAAAAAAABAAAAAAAAAAAAAAAAABBAABABAAAAAABABAAAAAAAAAAABBABAAAABBAAAAAABBABBABAAAABAAAAAAAABABAABBAAAABABAAAABAABBAAAAAAABBABBABA...

result:

ok good plan