The problem is about counting the number of strings of size $$$n$$$ consisting of $$$'a'$$$ and $$$'b'$$$ such that for any substring of the string, the absolute difference between the number of $$$'a'$$$ s and $$$'b'$$$ s is less than $$$k$$$.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3880 |
2 | jiangly | 3669 |
3 | ecnerwala | 3654 |
4 | Benq | 3627 |
5 | orzdevinwang | 3612 |
6 | Geothermal | 3569 |
6 | cnnfls_csy | 3569 |
8 | jqdai0815 | 3532 |
9 | Radewoosh | 3522 |
10 | gyh20 | 3447 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | awoo | 161 |
1 | maomao90 | 161 |
3 | adamant | 156 |
4 | maroonrk | 153 |
5 | -is-this-fft- | 148 |
5 | atcoder_official | 148 |
5 | SecondThread | 148 |
8 | Petr | 147 |
9 | nor | 144 |
10 | TheScrasse | 142 |
The problem is about counting the number of strings of size $$$n$$$ consisting of $$$'a'$$$ and $$$'b'$$$ such that for any substring of the string, the absolute difference between the number of $$$'a'$$$ s and $$$'b'$$$ s is less than $$$k$$$.
Название |
---|
what are the constraints?
I don't want you to solve the problem. Just find the judge.
$$$n,k$$$ $$$\leq$$$ 1000
Actually, the solution and the checker here should be the same, unless, of course, if you are fine with having a greedy checker.
I have already solved the problem :|
I want to find the source!
maybe there is no source!