Loading

CF1272F Two Bracket Sequences

考虑设 \(f_{i, j, k}\) 表示在 \(s\) 中匹配到 \(i\),在 \(t\) 中匹配到 \(j\),有 \(k\) 个左括号没有匹配。

然后用 BFS 进行匹配,能保证长度时最小的。

posted @ 2025-11-05 17:05  Alexande  阅读(4)  评论(0)    收藏  举报