№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 166 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Название |
---|
Can you provide problem description? I can't open link, maybe beacause of Great-Firewall.
Finally it's opened. " Given a map of N * M (2 <= N, M <= 12) , '.' means empty, '*' means walls. You need to build K circuits and no circuits could be nested in another. A circuit is a route connecting adjacent cells in a cell sequence, and also connect the first cell and the last cell. Each cell should be exactly in one circuit. How many ways do we have?"
This problem can be solved using dynamic programming on the broken profile. Profile contains at most 12 integers in [0..K] and forms correct bracket sequence. e.g. "122331"
XXXXXX
XXX331
122XXX
XXXXXX
Thanks :)
Here is another link. Let me know if you can able to open it :)
UPD: Sorry didn't see your comment.
This type of DP is better known as a "profile DP" or "frontier DP". Here is a good description of just the high-level concept and here has an example with code.
The question linked is a little more complicated but can be solved with the same concept.
Thanks :)