我们贪心的维护当前位置下字典序最小的位置所有可行的端点即可。使用 $n$ 个 bitset 维护当前位置作为起始点是否可行,随后二分下一个可以填的字符即可。复杂度 $O(\frac{n^3\log \sum}{w})$,可以稳稳的接住本题。
QOJ.ac
QOJ
The 3rd Universal Cup Finals is coming! Join our Warm-up Game and Prediction Game and win the prizes! Learn more...
Discussion #1629 for Problem #17714. Cat Cut
Type: Editorial
Status: Open
Posted by: tzl_Dedicatus545
Posted at: 2026-04-27 11:07:39
Last updated: 2026-04-27 11:23:46
O(n^3 log \sum /w) 做法
Comments
No comments yet.