[状压DP] Codeforces Round #585 (Div. 2) E. Marbles
The main fact is that the number of colors is less than 20, which allows us to use exponential solutions.
For each pair of colors (i,j), we can calculate cnt[i][j] — the number of swaps required to p...
原创
2019-09-20 00:42:49 ·
178 阅读 ·
0 评论