2015年6月15日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3006注意到集合内数字最大只有14,状态压缩一下,然后枚举出所有状态#include #include #include using namespace std;int dp[1<<15];int main() {... 阅读全文
posted @ 2015-06-15 23:04 LegendaryAC 阅读(142) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2276矩阵乘法可以解决的一类灯泡开关问题/*转移关系为 now left now*1 0 1 1 1 00 1 10 0 0可知F[i] = (f[i] + f[(n... 阅读全文
posted @ 2015-06-15 18:11 LegendaryAC 阅读(254) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2254矩阵乘法两个经典问题的综合题,还要离散化和处理边界,好题啊好题题意容易理解错,每一天是独立的,所以根据加法原理方案数是G^1+G^2+...+G^t/*此题要求 (G^1+G^2+...+G^t2)-(G^1... 阅读全文
posted @ 2015-06-15 14:21 LegendaryAC 阅读(173) 评论(0) 推荐(0) 编辑