2019年5月6日

CF 1150 D Three Religions——序列自动机优化DP

摘要: 题目:http://codeforces.com/contest/1150/problem/D 老是想着枚举当前在给定字符串的哪个位置,以此来转移。 所以想对三个串分别建 trie 树,然后求出三个trie树上各选一个点的答案。那么从“在三个trie树的根,在给定字符串的0位置”开始扩展。 当然 T 阅读全文

posted @ 2019-05-06 21:47 Narh 阅读(234) 评论(0) 推荐(0) 编辑

导航