# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Name |
---|
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 :)