摘要: 跟 HDU 4057Rescue the Rabbit差不多的AC自动机+dp,比赛的时候被虐成傻逼了!!!999的状态不多,直接状态压缩就行。dp[i][ACstatus][status] 到字符串第i位置,在AC自动机上状态为ACstatus,包含到999的状态为status。更新了一下自动机的模板。。。Orz简洁写法View Code #include <iostream>#include <cstdio>#include <cmath>#include <vector>#include <cstring>#include &l 阅读全文
posted @ 2013-04-01 15:34 AC_Von 阅读(423) 评论(0) 推荐(0) 编辑