QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#621699 | #6611. United in Stormwind | HuangHanSheng | AC ✓ | 82ms | 44216kb | C++20 | 2.1kb | 2024-10-08 16:20:09 | 2024-10-08 16:20:10 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
Test #1:
score: 100
Accepted
time: 37ms
memory: 44040kb
input:
2 2 1 AA BB
output:
3
result:
ok 1 number(s): "3"
Test #2:
score: 0
Accepted
time: 34ms
memory: 44080kb
input:
2 2 1 AA AB
output:
2
result:
ok 1 number(s): "2"
Test #3:
score: 0
Accepted
time: 34ms
memory: 43996kb
input:
5000 10 12302135 AABAAAABBA AAABAABBAB BAABABAAAB ABBAABBBBA BAAAAABAAB BABBAAAAAA BABBABABAB BBABBAAAAB BABBABBBBA AAAAAAABAA BBBBBAABBA BAABABBAAB BABAAABAAA AAAAABAABB BBABAABABB ABAABBABBA BBBAAABABA BAAABABBAB ABAAAAABAA AABBBBBBAA ABBABBABBA AABBBABBAB BAABBAAABB BAAABBBBBB ABABBAABBB BABBABBA...
output:
300
result:
ok 1 number(s): "300"
Test #4:
score: 0
Accepted
time: 33ms
memory: 44208kb
input:
5000 10 1 AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABBAABBBB AABB...
output:
0
result:
ok 1 number(s): "0"
Test #5:
score: 0
Accepted
time: 30ms
memory: 44032kb
input:
5000 10 8968133 BABAAAAAAA BABAAAAAAA AAABAAAAAA BABBBBBAAA AABBAAABAA AAABAAAAAA ABAAABAAAB BABBBBBAAA BABAAAAAAA BABBBBBAAA ABAAABAAAB BABAAAAAAA ABAAABAAAB AABBAAABAA AAABAAAAAA BABAAAAAAA AAABAAAAAA BABBBBBAAA BABBBBBAAA BABAAAAAAA BABAAAAAAA AABBAAABAA AABBAAABAA AAABAAAAAA AAABAAAAAA AAABAAAAA...
output:
886
result:
ok 1 number(s): "886"
Test #6:
score: 0
Accepted
time: 37ms
memory: 44028kb
input:
5000 10 10507302 BBBAABAAAB BBBAABAAAB ABAABAAAAA BBBABBAAAA ABBABABBAB ABBABABBAB BBBABBAAAA BBBABBAAAA AABAABBABA ABBABAAABB ABBABAAABB ABAABAAAAA BBABBABBAB BAABBAABAA BAABBBAAAA BABBBABAAB ABBABAAABB BAABBAABAA BBABBABBAB BBABBABBAB ABAABAAAAA ABBABABBAB ABAABAAAAA ABBABAAABB AABAABBABA BBABBABB...
output:
755
result:
ok 1 number(s): "755"
Test #7:
score: 0
Accepted
time: 30ms
memory: 43988kb
input:
5000 10 10810288 BBBAAABBBB BBBBBAAAAB BBBABAABBB BBBBABBBBA BBBBABBBBA AAAAAABAAA BBAAABBABB AAABBABAAB AAABBBAABB ABBBBBABBA ABABABBBBA AABBABBBAA AAABAABBAB BBBAABBBAA AAABAABBAA BBAABBBAAA ABBAABABBB BBAABBBAAA BAABBBBABA BBBBBABABA AABABABAAA BABBBBBAAB BBABBABAAB AAABAABBAA BBBBABBBBA AAABAAAB...
output:
870
result:
ok 1 number(s): "870"
Test #8:
score: 0
Accepted
time: 32ms
memory: 44004kb
input:
5000 10 12280385 ABABAAABBA ABBBBABBAB AABBBBAABA BBBABAABAA AAAAABABAA BBBBABAAAA BBAAAABBBA ABABBABAAB ABABAABBAB BAAABAAAAB AAAABBBABA BABBBAABAA ABBBBBBAAB ABBBABBABA BBAABAABAA ABABBBAABB ABBBBBAAAB BBBAABBAAB BBBBBAABBB BBBABAABAB ABAAAAABBB AAAAABABAA BBAAAAABBA BAAABBABAB BABBBBBABA ABAAABAB...
output:
141
result:
ok 1 number(s): "141"
Test #9:
score: 0
Accepted
time: 37ms
memory: 44072kb
input:
5000 10 12436636 ABABABAABB ABAABAAABA BBBBAAABAB BABAAABAAB BBABABAABB ABAABAAABB ABBAAAABAB BAAAABBBBB ABABAAAABB BAABAAABBA AAAAAAABAA BAAABBABAB BAAABBBABA AAAABBBBAA AABBBAABBA BBBAAAABAB BBBBAABBBB AABABBBBBA ABABBBAABB BBAABBABBA ABAABABABA BBBBAAABAB BBBBBAAAAA AAABABAAAB ABABAAAAAA AABBABAB...
output:
28
result:
ok 1 number(s): "28"
Test #10:
score: 0
Accepted
time: 29ms
memory: 44008kb
input:
5000 10 9373047 ABABAAABBB BABBAABABB ABABAAAAAB ABBBAAAABA ABBBAABABB AABBBBBABB AAABAAABAB ABAABBBBAB ABAAAABAAB BBABBBBBAA AABAAAAABB BAAAAAAABA BAABBABBBB BABAABABBB ABBBAABABB ABBAAAAABB BABBBABBAB ABAAABABAB AABBBABAAA AAABAAAAAB AABBAABABB BBBBAAAAAB AAABBAABBA ABABABABBB AABBBBBBAB AAABAAABB...
output:
999
result:
ok 1 number(s): "999"
Test #11:
score: 0
Accepted
time: 49ms
memory: 44052kb
input:
5000 20 12473302 AAAABBABAABBBABABBAB ABAABAAAABAABBABBABA ABBBAABABABABBBAAAAB BBABABBBAAAAAAABABAA BAABBBBAABBBBABABBBB BABBBABBBAAABABAAABB BAAAABAABBABAABBABBA ABBAABAAABABABBABBBA AABAABABAABAABAABBBA BBBABABAABBAABAAAABA BBBBBABAAABBBBBABBBB BBAAAAAAAAABBABBBABA ABBAAAABABAAAAABBBBB BBAABBABAB...
output:
635417
result:
ok 1 number(s): "635417"
Test #12:
score: 0
Accepted
time: 41ms
memory: 44052kb
input:
5000 20 1 AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBBBAA AAABABAABABBAABBB...
output:
0
result:
ok 1 number(s): "0"
Test #13:
score: 0
Accepted
time: 43ms
memory: 44084kb
input:
5000 20 9998760 ABABBAABBBABAAAABBAB BBBABAABAABAAABAAAAA BBBABAABAABAAABAAAAA ABAAAAAAABAABAAABAAB BBBABAABAABAAABAAAAA ABAAAAAAABAABAAABAAB BBBABAABAABAAABAAAAA ABAAAAAAABAABAAABAAB BBBABAABAABAAABAAAAA BBBABAABAABAAABAAAAA ABABBAABBBABAAAABBAB ABBBBABBBAAAAAAAAABA ABBBBABBBAAAAAAAAABA BBBABAABAAB...
output:
1023376
result:
ok 1 number(s): "1023376"
Test #14:
score: 0
Accepted
time: 48ms
memory: 43968kb
input:
5000 20 11247826 BBAAABBABBABAABABAAA BAABABBAABBBBAAAABBA AAAAABABAAABAABAABBA BBBBBABAAABABBBBAAAA BBBBBABBBABABABBBABA BBBBBABBBABABABBBABA BABBAAABBBBAABABAABA AABBAAABABABAABBBBBA BBAAABBABBABAABABAAA BBBABBBAABABBBAAAABB BAABABAAAABBBABBBBAA BBBABBBAABABBBAAAABB BAABABBAABBBBAAAABBA AABBAAABAB...
output:
929006
result:
ok 1 number(s): "929006"
Test #15:
score: 0
Accepted
time: 46ms
memory: 44064kb
input:
5000 20 12248582 ABABABABABBBAABAAABA BBBABABABBABBBBBAABA BAAAAAAABABBBBBBBABB BAAABAAAAAAAABAABABB BAABBBAABBABABBBBAAB BBAABABBBAABBBAAABAA BABABBABABBBABABABAB BBBBABBBBAABABBAAAAA ABBBBBBBBABBABBBBAAB AABBBBBABBBABBBAAAAA ABABAAABABBBAABAABBA BBABABAAABBABAAABABA BBBBBAABBABBBBBBAAAB AAABAAABBA...
output:
342770
result:
ok 1 number(s): "342770"
Test #16:
score: 0
Accepted
time: 45ms
memory: 44072kb
input:
5000 20 12315136 ABBBABABBABBAABBBAAA BAAAABAABAABAABBABAA BBBABBBBABBBBABBBBAB AAABAABBAAAABBAAABAB AABBABBBBAAAABABAAAA BBABBBBAAABBBBAAABBB ABAAABAABAAAABABBBAA BABBBBBABABAAABAABAB AAABAABABBABBAAAAAAB ABABBABBAABBBAAABABA BAABBAAABBBAABABBBAA BAABBBAAAAAABABBBAAB AAABABBAAABABBBABBBA AAABAABBAA...
output:
891051
result:
ok 1 number(s): "891051"
Test #17:
score: 0
Accepted
time: 54ms
memory: 44044kb
input:
5000 20 12460867 AABBABBAAABABABABABA ABAABBBABAAAABAABABB ABAABAAABAABABAABAAA AABABBABBAABABBAABBB BAABBAABABBABBABBBBA BBBABABAAABBBAABBABA BABABBAABBABAAAABABB BABBBABBBBAABAABBABA BABABBABAAABBAABABAA AABAABBBABBAABBABABB AABBBABBBBABABBAAAAA BBBBBABBBABBBBBAABBA ABABAABBAAAAAABAAABB AABBBABAAA...
output:
487621
result:
ok 1 number(s): "487621"
Test #18:
score: 0
Accepted
time: 44ms
memory: 44212kb
input:
5000 20 12482845 BBBBAABABBBAAAAAABBA BBBAAAABBABBABBAABAA BABABBBBBAAAAABBBAAB AABAAABABAAABBAAABAA AAAAABAABAAABBAAABBA ABBBAAABAAAAAAAAAAAB ABABBABABABBBAAAAAAB BBABBABABBBAABBBABBA BBAAABBAAABABBBBAABB ABBAABABAABBAABABABA BBBAABABABBBBBABAABA AABAAAAAAAAABAAABBBA BAAAABABBBABAAAABABA BAAAAABBBA...
output:
148743
result:
ok 1 number(s): "148743"
Test #19:
score: 0
Accepted
time: 53ms
memory: 43944kb
input:
5000 20 12302677 BBAABBBAAAAABAAAAAAB AABBBAAAAABAAABBAAAB AABABAABBBAAAABAAABB BBBBBABAABAAAAAABBBA AABBAAAAABBAABABABBB BBAABAAABABBBBBAABAB BBAAABAAABBBBBAABBBA BBABBAABAABBABBABBAA ABABBABABBBAAABBBBBB BAABBAABBBAABBBAAABB ABBBBAABBABBBAAABBBA AAABABAAAAAAABBBAABB AAAABBBBAABBBBABBBAA AAABBBAAAA...
output:
993237
result:
ok 1 number(s): "993237"
Test #20:
score: 0
Accepted
time: 30ms
memory: 44072kb
input:
200000 1 9999998911 A B B A B B A A A B B B B B A B B A B B A A A A B B A A A B A B B A A B B B A A A B A A A B A A B A B B B A A B B B A B B A A B B A B B B A A B B A B A A B A A A B A B B B A B A B B B B A A B A B B B A B A A B B B B B A A B B A A B A B A B A B B A B B A A B B B A B A A B B B B B ...
output:
1
result:
ok 1 number(s): "1"
Test #21:
score: 0
Accepted
time: 40ms
memory: 43980kb
input:
200000 2 1 BB BA BB AB BB BB BA BA AB BA AB BA AB AB AA BA BB AA BA BB AB AB AB AB BA BB BA AA AA AB BB AA AA BB BB BA AB AA AB AB AA AB BA AA BA AA AB BB AA BB BB BA BA BA AB AB AA BA BB AB AA BA BA AB BA BA BA BB BB BA BA BA AA AB AB AB AB BA AB BA BB AB BB BB AB BB BB BA BA BB AB AA AB AA BB BB A...
output:
3
result:
ok 1 number(s): "3"
Test #22:
score: 0
Accepted
time: 37ms
memory: 44132kb
input:
200000 3 14999990279 ABB BBA BAA BBA AAA AAB BBA BAA BBB BBB BAB ABB BAA BBB BAB BBB BBB BBA ABA BAB BAA BBB ABA BAB AAA BAA BAA BAA BBA AAB BAA ABB BBA AAA BAB AAB ABB AAA AAB BAA BBB ABA BAB ABB AAB BBA BAB AAA BBB BAA ABA AAA ABB BBB AAB AAB AAB AAB ABB AAB BAB AAB ABA BAB ABB BAB ABA ABA ABA AAB...
output:
2
result:
ok 1 number(s): "2"
Test #23:
score: 0
Accepted
time: 38ms
memory: 43984kb
input:
200000 4 14999997039 BAAB BABA AABA BBAA BAAA BABB ABBB AAAB AAAA BABA AAAB ABAA AABA AABB BBBA AAAB AABB BBAA BBBA BBBA BABB BBBB ABBA BABB AAAA ABAB ABBA BBBB BAAA ABAA ABBB BBAA ABAA BAAB ABAB BBBA ABBA BBAA BBBA AAAB ABBA BBAB AAAB AABB BBBB ABBB AABA BAAB ABAA ABBB BABA BBAB BBAA AAAA ABAB ABAA...
output:
7
result:
ok 1 number(s): "7"
Test #24:
score: 0
Accepted
time: 39ms
memory: 44216kb
input:
200000 5 17499883577 BBAAA ABBBB ABBAB AABBA ABABA BABAB BAABA BBBBB ABABB AABAA BBAAA ABBAB BBBBA BAABA BAAAB ABAAB AAABA BBABA AABAA BAABB AAABA AAAAB ABAAB BABAB BBBAB AABAA ABAAB AABAB AAAAA BAABB AABAA BAABA BAAAB ABAAA BBBAA BAABA BABBB ABBAB BAAAA AAAAB BABBB BBAAB BBABB ABABB BBABA BAABB ABA...
output:
12
result:
ok 1 number(s): "12"
Test #25:
score: 0
Accepted
time: 36ms
memory: 44072kb
input:
200000 6 19687442613 ABBBAB AAABBB AAABAA AABABB ABAAAB ABBBBA AABAAA BBBABA BBAAAA ABAABA ABBBBA ABABAA ABABAA ABBABB ABABAA AABBBB AABAAA ABAAAB BAAABA BBABAA AABABA AAAAAB BABBAA AABBAA BBBBAB ABBBAB BBBBAB ABABAA ABBBBA BBBBBB BAABBB BBBBBB AAAAAA ABABBB AABAAA AABBBA BABAAA ABABBB AABBBB BBBAAA...
output:
1
result:
ok 1 number(s): "1"
Test #26:
score: 0
Accepted
time: 40ms
memory: 44208kb
input:
200000 7 14999854317 BAABBBA ABAABBA ABABBAA AABBBAB BBABBAA BBBAAAA ABBBBBB ABBBABB AABBAAA AAAAABB BAABBBA BBBBBBB BABAAAA AABAAAB AABAABA BABAAAB BAAAABB ABABBBA ABBBBBA BABBBBA AAAAABB AAAABAB BAABABA AABAABA ABBAABA AAABBAA AABBABA BBBBBBB BABBBBA ABBAABA BBBBABA AABABAA BBBBAAA BBAABAA ABAAAAB...
output:
118
result:
ok 1 number(s): "118"
Test #27:
score: 0
Accepted
time: 42ms
memory: 43996kb
input:
200000 8 17499967620 AABAAABA AABBABAB BABBABBB BABAAABA AABABABB BBBBABBB BAABBBBA ABBAAABA ABBABABB BBBBABBB AABABABB BBAABBAA AAAAAAAA BAAABABB ABBBBBBA BBBBAAAA BABBBBAA ABAABAAA BBABABBA BBBBABBA BBABABAA BAAAAAAA BABAAAAB AABBBBBB ABBBBAAB ABAAAABA AAABABAA AABABBBB BBABBAAA AABBAABA AABAABAB ...
output:
171
result:
ok 1 number(s): "171"
Test #28:
score: 0
Accepted
time: 46ms
memory: 44008kb
input:
200000 9 19687407472 BBBBAABAB BABAABABA BBBBBBABA BABBABABB BABBAAABA AAABBABAA AABABBBBA BABBBAABB BBBBBAAAA BABBBBBAA BBBBABBBA BBBAABBAA BBABBBBBB ABBBBABBB BBBABABBA AAABBABAB BAABBAABB BAABABBAA BAABBAABA BAAAABAAB BBBABBBAA BAAABBABB BAAAABBAA AABABABAA BABABAABA BBABABBAB BABAABAAB ABABABBBB...
output:
96
result:
ok 1 number(s): "96"
Test #29:
score: 0
Accepted
time: 44ms
memory: 44172kb
input:
200000 10 17499854307 ABAABBBAAA AAAAAABAAB BAAAABBABB ABAAAABAAB BBAABABBAB BBABAABABB BAABAABBBA ABBAABBBBA ABABBBBAAA BAAAABAABA BBAAAABAAA BABAABABBA BBABBABBAB BBBAAAAAAB ABABAABBAA AABBBABAAA BBABBAAABB ABAABAAABA AAAABABAAA BABBBBBBAB BABABAABAA AAAABBABAA BAABBBAABA ABBBAAAABB BAABBABABB AAA...
output:
965
result:
ok 1 number(s): "965"
Test #30:
score: 0
Accepted
time: 37ms
memory: 43976kb
input:
200000 10 1 BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BBABBABABB BB...
output:
0
result:
ok 1 number(s): "0"
Test #31:
score: 0
Accepted
time: 38ms
memory: 44044kb
input:
200000 10 15999912512 BABBAAABAA BAAAAAAABB BAABBBBABB BAABBBBABB BAABBBBABB AAABAABBBB BABBAAABAA BABBAAABAA BAAAAAAABB BABBABBAAA BABBAAABAA BABBAAABAA AAABAABBBB BABBABBAAA AAABAABBBB AAABAABBBB AAABAABBBB BABBAAABAA BABBAAABAA BABBABBAAA BABBABBAAA BABBAAABAA BAAAAAAABB AAABAABBBB BABBABBAAA BAB...
output:
730
result:
ok 1 number(s): "730"
Test #32:
score: 0
Accepted
time: 40ms
memory: 44080kb
input:
200000 10 17197467436 AABABAAABA BAABAAABBA ABAAABABAB BAABABAAAA AABABABAAB ABAAABABAB BAABAAABBA ABBAABBABA ABAAABABAB ABBAABBABA BAABAAABBA ABBABABBBB BAABAAABBA AABABAAABA AABABABAAB BAABAAABBA AABBABBABA AABABABAAB ABABABBBAB AABABAAABA BABBBBABAB BABBBBABAB AABABABAAB ABAAABABAB ABABABBBAB BAB...
output:
768
result:
ok 1 number(s): "768"
Test #33:
score: 0
Accepted
time: 42ms
memory: 44212kb
input:
200000 10 19376668500 ABBBABBBBA BAAAABABBB BBAABBABBA BBABAABBBB ABBBABBAAA ABBBABBBBA BBBBAABBAA BABBBAABBB ABBBABBBBB ABBBABBAAA ABBAABABAA AAAABAABBB ABAAABAAAA BBABAAABBB ABBABBABBB BBBBBBABAB AAAAAABAAA AABBABBAAA ABABABBABB ABBBABBBBB ABBBABBBBA AAAABAAAAA ABBABABAAA ABABABBABB BAAAABABBB BAA...
output:
201
result:
ok 1 number(s): "201"
Test #34:
score: 0
Accepted
time: 45ms
memory: 44008kb
input:
200000 10 18587084437 BBABBABABA AABBABABAB BBAABBABBB ABAABBABAA BBBBBBAABA AABBAAABAA BABBAABABB BABBABAABA BABBBABAAB BAAABBAAAA ABABAABABB BBBAABBABA BAABABABBA ABBBAABABA BBABAAABBA BAABABABBA ABABBAAAAB BAAABBAAAA BAABBAAABB BAABABBAAA BBAAABAABA BBBBAABBBB BBABBABABA BABAAABAAB BAAAABABAB BBA...
output:
697
result:
ok 1 number(s): "697"
Test #35:
score: 0
Accepted
time: 47ms
memory: 44208kb
input:
200000 10 19669942496 ABAABBBBBB AABBBBABAA ABAABBABAB ABBAAABBBB BAAABAABBA AABAAAABAB BBAABBABAA BAABBBBABB BABAAABABA ABAAAAABBA ABAABBABBA BABABBBAAA BBBAAAAAAA BBBBBBBABA BABBABBBAA AABABBBABB BBAAAAAABA AAABAAAAAA BAABBABAAA BAAAABABBA AAABBABAAA AAABBBBAAA ABAABABBAB ABBBAABBAB AABAAABBAB BBB...
output:
198
result:
ok 1 number(s): "198"
Test #36:
score: 0
Accepted
time: 46ms
memory: 44052kb
input:
200000 10 18749762838 AABBABABBA AABABABABB BBABBBBBBA AABBABBBBB BBAABAAABB BAAAAAABAB ABABABBBAA ABBBAAABBA ABBBAAABBB AAAABABAAA AAABBBAAAA AABBAAABBA AAAABBABAA BBABBABABA AABBBBAAAA AAAABAABAB BBBAAAAABA BBBBBABABA AABABBAAAA AABABAAAAA AAAAABBBBA AABAABABAA BABBAABBBA AAAAAAABBB AABBABAABA BBA...
output:
641
result:
ok 1 number(s): "641"
Test #37:
score: 0
Accepted
time: 49ms
memory: 43980kb
input:
200000 11 19374883366 BABBBBBABAA ABABBBAABBA AABABBAAABB ABABABABABB AABBAAABABB AABABBABBAB AABAAABAAAA BABBBBAABBB AABAAABBBBB AAAABBABBBB ABBBBABAABA BAABBABBABB ABBABABBAAA AABABAAAAAA BBAAABAAABB ABBAABABAAA BBBABBBAABB ABABABBAAAA BABBBBBAABA BBBBABABAAA BAAAABBBABA AAAAABBABAB AABABAAAAAA AB...
output:
1402
result:
ok 1 number(s): "1402"
Test #38:
score: 0
Accepted
time: 51ms
memory: 44196kb
input:
200000 12 17499945718 AAABAAABABBB AABABBAAAAAA ABBAAAAABABA ABAABAAABBBB AABAAABAABBA AABBBAAAAABA BBBBBBABABBA BABABAABAABA BABBAAAABBBB ABBBBBAAABAB BAABBBBAAAAB ABBBAAAAAABA BAAABABBABBB BAAAABAAABBB BABBBBBABBAB AAAABBBBAABA BBAABABBBABB BAAAAABBBBBA ABABABABAABA BAAAABBAABBB BABBABAABABB BAAAB...
output:
3887
result:
ok 1 number(s): "3887"
Test #39:
score: 0
Accepted
time: 48ms
memory: 44192kb
input:
200000 13 19374912951 ABAABAABBBABA BABBABAABABBA AAABBABBBBAAB BBABBBBABBBBA BABBBBBBBABBA BABAAAABABABB BAABBBAABABAB AABBABBBBAAAA ABBABABAABBAB AABBAABBAABAA AABABAABABBBA ABAAAABABAAAA AABBAABBAABAB ABBBABAAAABBB BBBABABBAAAAB BAABBBAABAAAA AAAABBAABABAA BAABBAAABBBBB BBBABABBABBBA BBAABAAAAABA...
output:
6372
result:
ok 1 number(s): "6372"
Test #40:
score: 0
Accepted
time: 45ms
memory: 44004kb
input:
200000 14 19980372123 BABBBAABAAABAA BBBAABAAABABAB ABABABABABAABB BBAAABBBBBBBAA ABBABBABBABABA ABBBABBBAAAAAA AABABBABBBAAAB AABAAABABBBBBB AAAAABABBABBAA BBABBABABBBBAB BBBBABABAABAAB ABBABBBAABBBBB BBBAAABBABABBA BBABBBAAABABBA AAAABBAAABBABA BBAAAAABBABBAA AABBAAABAABBAA BAAABBBAABBABA AABAAAAA...
output:
665
result:
ok 1 number(s): "665"
Test #41:
score: 0
Accepted
time: 53ms
memory: 44208kb
input:
200000 15 19980372402 AAABABABBABAAAA BAAAABAABBBAABA AABBBBBABAAABBA AABBAABAAAAABBB BBBBABBABABBBBB ABBABABABBBAABA BBBBABAAABAABBB BBABBAABAABBBBA BAABABBBAABAABA BAABABBBBAABBAA ABABAABBABABBAA ABABABABBBABBAA ABAAAABBAAAAABB AAABAABAAAABBBB ABABAAABBBABBAB AABBAABBBAABBBA AAABABBBBBAABAA AAABAA...
output:
3150
result:
ok 1 number(s): "3150"
Test #42:
score: 0
Accepted
time: 55ms
memory: 44064kb
input:
200000 16 19921763623 BBAABBABABAAAABB BBABBAAAAABAABAA BBBBAABAAAAABBAB AABABBABAAAABABB AAABABAABABAABBA BBBBBBABBABBAAAA ABABABABAAAAAAAA ABAABBBBBAABBBBA ABAABBAAAABBBBAA BBBABBBAAABAAABA BABAABBBAAAABAAB BBBBBABBAAABBBBB BABBBBABABBAABBA BABABABAABBABAAB AABAABBBAAAAABAB ABBABAAAABBAABBA AABAAA...
output:
38403
result:
ok 1 number(s): "38403"
Test #43:
score: 0
Accepted
time: 57ms
memory: 43980kb
input:
200000 17 19921783725 BABBBBABBBBBBBBAB AABABAAABAAAABAAB BAAAABAABBBBABAAB AABBBAAABAAABBABA AAAAABBBAABBAABAA AAABABAAAABABBBAA AABAABAABBBBAAABA ABABAABABBBABBAAB AABBBBBABBAABABAA BABAAAAABBBBABBAA AAAAAAAABBBAAAAAB BBAABAAAABBABABAA AAABBBABAABBABBAB ABAAABBAAABABBABA BABBBBAAABBAABBAB AAAAABBA...
output:
73656
result:
ok 1 number(s): "73656"
Test #44:
score: 0
Accepted
time: 69ms
memory: 44208kb
input:
200000 18 19921779649 AAABAABBAABBBBAAAB ABBBAAAAABBBBAAAAA BBAABBBBBABBABABBA BABAAAABBAAABAABAA BAABBAABAABABBAABB AAAABAABABABBABBAA BBBBBAABBABBBAAAAA BAAAABABAABABBBBBA BABAAABBABABABBABA AABABAABBAABBAABAB BBABBAAABABBBBBABB BBBAAABABBAABBABAA BBAABBABABAABBBABA BBBBABBAABAABABBBB BBBABAABBBAB...
output:
174446
result:
ok 1 number(s): "174446"
Test #45:
score: 0
Accepted
time: 70ms
memory: 44052kb
input:
200000 19 19998678767 BBAABABBBAABBBBBABA AAABAAAABBABBAAABAB BABAAABBAABBABAAABA BABBABBBBAAABBBAABA ABAABABAAABBBAAAAAA BAABBBBBAAAAAABABBB ABABBAAAAABBABABBBB AAABBBBBBAAABBABAAA ABBBAAAAABAAAAABABB ABAAABAAAABAAABBAAB ABBABBAABBAABBBBBBB BBABBBBAAAAABAAABAB ABBBABABAAABBBBABBA BABBBBBAAAAABBBBAB...
output:
13094
result:
ok 1 number(s): "13094"
Test #46:
score: 0
Accepted
time: 56ms
memory: 44084kb
input:
200000 19 1 AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABABABBBAABAAB AAABBABA...
output:
0
result:
ok 1 number(s): "0"
Test #47:
score: 0
Accepted
time: 59ms
memory: 43980kb
input:
200000 19 15999918345 AAABBBBBBBAAABAABBB BBABBBABBBAAAAAAAAA BBABBBABBBAAAAAAAAA AAABBBBBBBAAABAABBB AAABBBBBBBAAABAABBB BBABBBABBBAAAAAAAAA BBABABBABBAAABBABAA BAAABAABBBBABBBAAAB BBABBBABBBAAAAAAAAA BBABABBABBAAABBABAA BBABABBABBAAABBABAA BBAAAABBBAABBBBAAAA BBABBBABBBAAAAAAAAA BBABBBABBBAAAAAAAA...
output:
498656
result:
ok 1 number(s): "498656"
Test #48:
score: 0
Accepted
time: 56ms
memory: 44052kb
input:
200000 19 17999910984 BBBABABBBBAABAAABBB ABBBBAABAAAAAAABABA ABBBABBBBBBBABBABAB ABBBBAABAAAAAAABABA ABBBABBBBBBBABBABAB ABABAABBABBAABABAAA BBBABABBBBAABAAABBB BBBAABBBAAAAAAABBBA ABBBABBBBBBBABBABAB BBBAABBBAAAAAAABBBA BBAABBBABBBBABABBAA BBBABABBBBAABAAABBB ABBBBAABAAAAAAABABA BBBABABBBBAABAAABB...
output:
437471
result:
ok 1 number(s): "437471"
Test #49:
score: 0
Accepted
time: 58ms
memory: 44060kb
input:
200000 19 19599890919 AABAAABAABAABBBBABB BAAABBBABBAAABBABAA ABBBBBBBABABAAAABAA ABBBABAAAABBBBBBBAA AAAABAAAABBBBBAABAA AABBABBAAAAABBBBBAA AAAAABBAABABBAAAAAB ABBBABAAAABBBBBBBAA BAAABBBABBAAABBABAA ABBAABBBBBBABBAABAB AAAAABBBAABBABAAAAA ABBBAABABBABABBAABB BABAAAAABABABAAAABB BBABBAAABAABBAABAA...
output:
130053
result:
ok 1 number(s): "130053"
Test #50:
score: 0
Accepted
time: 55ms
memory: 43976kb
input:
200000 19 19719579316 BBAAAABBABAABBAABAA ABAABBAABABBAABAAAB ABBABABBBBBBAABABBB BABBAAABBBBABAAAAAB ABBBBBBBBBAAAABBBBB BAAAABBBBBBBBBABABA ABAAABBBAABBAAAABAA BABBABAAAAAABABABBB ABABBABAABBBBBBABBB BBBAABABBBBAABAABAA ABABABBBABBAABABAAB AABABAAAABBBBBBABBA BABAABABBABBAAAAABA BABABBAABBBBAAABBA...
output:
397548
result:
ok 1 number(s): "397548"
Test #51:
score: 0
Accepted
time: 56ms
memory: 44056kb
input:
200000 19 18719925174 AABBABABBABBBABABAB ABAAABABABBBAAAAAAB AABAAABBABBBABABBAB BABABBAABAAAABBBBBB AAABBABBAABABAABBAB BBBAABBBABABABABBAB ABBAABAABABBBBAABAB BBABBABABBABBABBBAB BAABAABBAABABABAAAA ABAAAABABBBBBAABABA ABAAAABABAAAAABBBBB ABBBABBABAAABBBBABA BBBABABAAAAABAAAAAA AAABAAABAAABAAABAA...
output:
520845
result:
ok 1 number(s): "520845"
Test #52:
score: 0
Accepted
time: 64ms
memory: 44128kb
input:
200000 19 19959307756 BBAAABABBABABAABAAB BABBBABABBBBABABBBB BABBBBAAAABBAAABBBB BBBBAABAAAABAAABBBA BAABBBBABBABAAAABBB BBAAAABABABBBBAABBA ABABABAAABBBBABAAAB BABBAABABBBAAAABABB BBABBBBAABAABABBBAB BAAAABBABAAABABABAA BBAABBBAABBABBABBBB BAAAAABAABBABABABAB BBBABBBABAABBBBBABA BAAAAAABAAAABAAAAB...
output:
247886
result:
ok 1 number(s): "247886"
Test #53:
score: 0
Accepted
time: 68ms
memory: 43984kb
input:
200000 19 19991028941 ABAAAABBBABABBABAAB BBBBBBAAABABABABAAA BBABBBAABBABABABBAB AAAABBABBBBABABABBA BBBBBAAAABBAAABBBAB BAAABABAABABAAABABB AABAABABABAABBBABBA ABAABBBBABAABABBABB AABABBABABABBBAABAB BAABABAAAABABBABBAB ABBABABBABABBABABAB AABBAABBAABAAABBAAB AAAABBBAABABBABAABA BABAABAABBBBABAAAB...
output:
78389
result:
ok 1 number(s): "78389"
Test #54:
score: 0
Accepted
time: 71ms
memory: 44080kb
input:
200000 19 19958795374 BBBABABBBBBBBABBAAA ABBBABBBBBABBABAAAB AAAAABABBABABBAABBA AABAAABAABAAABABABB ABBABBAABABBABBAABA ABBBABBBBABBBAABABA AAABAAAABAAAABBBBAB BAABAAAABAABBBBBBAA ABAABBBBBBBABAABBAB BAAABABABABBBBABAAA ABAABBBBABBBBBBBABA BBAAABABAABBBABBABA BBAAAAAABBBBBAABABA AAABAAAABAAAABBBBA...
output:
334238
result:
ok 1 number(s): "334238"
Test #55:
score: 0
Accepted
time: 70ms
memory: 43980kb
input:
200000 19 19960448555 BBAAABBAABBBBBBBBBB BBBBAABAAABAABAABBB ABABBBBABABAABABABA BAABBBBAAABBBBBABAA BBAABAAABABBAAAAABA BBBBBABABABBABBBBAB BBAAAABBAAAABBBBBBB BBBABAABAAABABBBBAA AAABBABAAABABAABABA BABBBABAAABBBABBBAB AABBBABABABBAAAAAAB ABAABAAABBABABBAAAA ABBBABBBBBABAAAABBA BBBBBABBBBBBBABAAA...
output:
349440
result:
ok 1 number(s): "349440"
Test #56:
score: 0
Accepted
time: 66ms
memory: 44056kb
input:
200000 19 19980263140 ABAAAAABBBBAAABABAB BAAAABABAABABABBABA AABABBBABBBABBAABBA BABBABABABBBABABBAA BAABBABBBBBBBBAAAAB ABABAAAABAABABBABBB BAAAAAAAAABBAAABBAB BABBBBABBBAAAABBAAB BABAAABABABBBABABBA ABBAAABABBBAABABBBB AAAABABBBAABAABAABA AABBBABBAAABBABBABA BAABBAABABABABBBBBA ABAABABAAABABBBBBB...
output:
206671
result:
ok 1 number(s): "206671"
Test #57:
score: 0
Accepted
time: 67ms
memory: 43980kb
input:
200000 19 19687449585 ABABAABBAAAAAAABBBA AAABBABBBABBBBABBAB BBAABABABABBAABABAB ABABBAABABBABBABBBA BBBBAAABBBBBBABAABA BABBABABBAAAABBBAAA AAAABAAABAABBBABABA AABAABBBAAABAABABBB ABBBABBAAAAAABBAAAA BABBABABBABBBBABBAB BAABAAAAABBBAABBAAA BABABABBAAAAAAAABBB BBABAAABBBBABAAABBA BAAABABBAABBAABABB...
output:
485423
result:
ok 1 number(s): "485423"
Test #58:
score: 0
Accepted
time: 81ms
memory: 44060kb
input:
200000 20 19980375286 ABBBBAABBBABAABBBBBA ABABAAABBABBABBABBAB BBBAAAABABBABABAABAB BBBAAABABABBABAABAAB AABBAAAABBBBABAAAAAA ABABBAAABABABBBABBAA BABBBBAAABABAAAAABAB ABAABBBBBABBABABAAAB AAAABBAABBBBBBABBBBA BAABBBBBABBBBABAAAAB ABAAAAAABBABBBBBAABA BBBBBBAABBABABAABAAA AABBBAAABAAABBABABBB ABABB...
output:
444096
result:
ok 1 number(s): "444096"
Test #59:
score: 0
Accepted
time: 66ms
memory: 44064kb
input:
200000 20 1 BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABABBBAAB BABBAABBAABABAB...
output:
0
result:
ok 1 number(s): "0"
Test #60:
score: 0
Accepted
time: 64ms
memory: 44072kb
input:
200000 20 15999914477 BAABBBAABAABAAABBBAB ABBAAABBBBBABBAAAABB ABBAAABBBBBABBAAAABB BABBBBBBBBABAABABBAA ABABBBBABBABAABAABAB BAAABABBAAABBBBBAABA ABABBBBABBABAABAABAB BABBBBBBBBABAABABBAA BAABBBAABAABAAABBBAB BABBBBBBBBABAABABBAA ABABBBBABBABAABAABAB BABBBBBBBBABAABABBAA BAABBBAABAABAAABBBAB BABBB...
output:
1016656
result:
ok 1 number(s): "1016656"
Test #61:
score: 0
Accepted
time: 60ms
memory: 44028kb
input:
200000 20 17999925959 AABBBAABABAAABBAAABB BBAAAAABBBABBBBAABBB BABABBBBAAAABAABBBBB AABBABAABABAABBAABBA BABABBBBAAAABAABBBBB AAAAAAABBBAAAABAABBB AABBBAABABAAABBAAABB BBAAAAABBBABBBBAABBB BABABBBBAAAABAABBBBB AABBBAABABAAABBAAABB BBAAAAABBBABBBBAABBB AABBBAAAAAAABBBBAABB BABABBBBAAAABAABBBBB AABBB...
output:
848192
result:
ok 1 number(s): "848192"
Test #62:
score: 0
Accepted
time: 62ms
memory: 43976kb
input:
200000 20 19599929715 AAAABBBBAABABAAAABAA BAAAAAAABBABABAAABAB BBBABBAABAABBBBABABA BAAAAABABAAAAABBBABB BBAAAABAABBAABAABABB BBBABABAABAABAABBAAB BBBBBABBABBBAABBABAA AAAABBBBAABABAAAABAA AAAAABABABAAABAABABB AABBBABABAABBABBBAAA BAABAABABBBAABAABBBB BBAABABBAAABAAAAAABA BBAAAAAABBBAABABABBB BBBAB...
output:
419266
result:
ok 1 number(s): "419266"
Test #63:
score: 0
Accepted
time: 72ms
memory: 44028kb
input:
200000 20 19780102477 AAAABBABABAAAABBABBA AABBABABAAABBBABABAA ABBBABAABAABBBBBBBBB BAABAABBBBBBAAABABBB ABABABBAAAAABAABBABA ABBABBBABBBBBABABBAB BABBABAABBBAAABBAAAB AAABBAABBBABAABAABAA ABBBBAABBAABAABBABBA BBBABBAABBABAAABAABA BAAABBBBBBAAABABBBAB ABBBABAABAABBBBBBBBB BBAAAABABABBAAABAABB ABBBA...
output:
544749
result:
ok 1 number(s): "544749"
Test #64:
score: 0
Accepted
time: 67ms
memory: 44156kb
input:
200000 20 19885391989 BABABABAAABAAAAABAAB AABBBBBABAAABBABBAAA BBABAABBBBBBBBBABBAB AAABAABBAAABAAABABAA AABBABABBBABAABAAAAB AAABBBBABBAABBAAAABB BAABBBAAAABABABABBBB BBBBAABABABBAAAAABBB AAAAABABBBAAABAAAAAB AAABABAAAAABBAAABBAB BAAAAAABBAAAABABBABA BBBBBBABBABBBBAAABBA BABABBAABABBBBBAABAB AABAA...
output:
801683
result:
ok 1 number(s): "801683"
Test #65:
score: 0
Accepted
time: 66ms
memory: 44064kb
input:
200000 20 19941817038 ABABABBBAAAABBBBABAA BABBBBAABBBBAAAAAABB ABABABBAABBABBBBABAA AAAABABABBAABBBBAABA BABABBAABBBBBBABBBAB BBBBBABAABBBABABAABA BBBBBBABAABABBBBABBA AAABABABAABAABABBBBA BBBBBAAAAABBBAABBBAB ABBABABBBBAABABBBBBB BAAABBAAABAABBAAABAB BAAABBAAABAABBAAABAB AAAAABBBABBBABBBBABB BABAB...
output:
653509
result:
ok 1 number(s): "653509"
Test #66:
score: 0
Accepted
time: 71ms
memory: 43980kb
input:
200000 20 19976506600 BBBAABAAAAABBABBBBBB AABBBBBBABBBBBBAAABB BAAAAAAABBBBBAAAABBB BBAAABBBBABBBABBBBBB BBABBABBBBABBABAABBB AABBABAAABAAABABABBA BBBBAABBBAABABBABBAB AAABBBBBABAABBBBBBBB ABBBAAAAABBBAAAABBBB AABBBABAAAABABBBABAB AABABBBABABAABABBBAA ABBBABABAABBAAAAABBA BBABBBBABBBABABAAABB ABBBB...
output:
481280
result:
ok 1 number(s): "481280"
Test #67:
score: 0
Accepted
time: 77ms
memory: 44004kb
input:
200000 20 19992983839 AAABABBAABAAAAABBBAA ABABBBBAABABAABBBBBA ABAAAABAAAAABAABBABB AAABBBABBAAABAABBABA AABBABBABABBABAABABB BAABAABAABBBBAAAABBB ABAAABBBAAABABBBAABB ABABABBBBBAAABBBAABA AABBBBABAABAAABBAAAA BBBABAABABAABBBABBAB AABBABAAABABABAAAAAA BBABAAABABBBBAAAAABB AABBABBAABAAABBABBBA AABBB...
output:
242175
result:
ok 1 number(s): "242175"
Test #68:
score: 0
Accepted
time: 79ms
memory: 44028kb
input:
200000 20 19989794025 BBABBBBABAABBBBBBAAA AABABBABBABBABBBABAB ABAABABAAAABABBBABAB BBBBBBBAABAABBBAABAA ABBAAABABBABBAABBABA AAAABABAAABAAABBABAB AABBAABABBBBABAABBBA AAABBBABAAABAAABBBBB ABBABBAABBBBBBBABBAB BAABBABAAAAAAAAABABA BABBBBBBBAABBABBBBBB BBBBBABABABABBAABBBB BABAABBBABABAAABBAAB BAAAA...
output:
282959
result:
ok 1 number(s): "282959"
Test #69:
score: 0
Accepted
time: 77ms
memory: 44080kb
input:
200000 20 19994890116 AABBABBBAABABBABAABB BAABBBBBBAABABBBBBBB BBAABAABAABABABBBAAA AABABBBBBBAABABBBAAB BABAAAABAAAABBBBAAAA BBAAAAABAAAABABABBAB ABAAAAABABABBBBBAAAA ABABABBBBAAABBAABAAA ABABABBBBBBBBBBBBAAA ABBABBBBABBAAABAABBB BBBBBBBBBBBBAAAAAAAB ABABABBABBBBABAAAAAB BABBBAABBAABABAABBBA ABAAA...
output:
169460
result:
ok 1 number(s): "169460"
Test #70:
score: 0
Accepted
time: 82ms
memory: 44056kb
input:
200000 20 19960849809 AABAABABBAAABBABABBB BAAABBAABBBAABBABBAA BAAABBBABBAABABBABAA BBBAABABBABBBABABBBA ABAABBABABBAAABBABAA BBBBBBBBABAABBBAABAA ABBBBBABBBBBBAAABAAA AABBBAABABABBABBBBBA BABABBABBABBAABBAABB BBBBABBBAABAABAAAAAB BAAABABBBBBABBAABBBB ABBABAAAABBABAAABABA AAABBABBBBABBBBAABAA ABABA...
output:
772436
result:
ok 1 number(s): "772436"