rt。
没有使用状压,用时间复杂度 O(m∣s∣∣t∣)O(m |s| |t|)O(m∣s∣∣t∣) 的 AC 自动机上 dp 通过了此题。
https://www.luogu.com.cn/record/100148643