ビーバーの合唱 (Chorus)
Unrated
日本語
Language
Contribute a translation- Time limit
- 6000 ms
- Memory limit
- 1024 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
5 2 AABABABBAB
Sample output 1
2
Sample input 2
5 3 AABABABBAB
Sample output 2
0
Sample input 3
3 1 BBBAAA
Sample output 3
9
Sample input 4
10 3 ABABBBBABBABABABAAAA
Sample output 4
37
Notes
原典:JOI 2022/2023 春季トレーニング合宿 ビーバーの合唱 (Chorus)、情報オリンピック日本委員会。CC BY-SA 4.0。
Tags
No tags yet