2012年8月6日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3068新学的算法,求回文串用Manacher算法讲解:http://acm.uestc.edu.cn/bbs/simple/?t3258.htmlView Code #include using namespace... 阅读全文
posted @ 2012-08-06 17:05 LegendaryAC 阅读(384) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1757还是矩阵+快速幂,注意要把初值乘回去并且注意方向View Code #include using namespace std ;void mul(int a[11][11],int b[11][11],int... 阅读全文
posted @ 2012-08-06 17:03 LegendaryAC 阅读(150) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1575矩阵+快速幂A^k是A*A*A...(k个A相乘)View Code #include using namespace std ;void mul(int a[11][11],int b[11][11],in... 阅读全文
posted @ 2012-08-06 11:24 LegendaryAC 阅读(278) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2065dp转移方程:dp[i][1]=2*dp[i-1][1]+dp[i-1][2]+dp[i-1][3];dp[i][2]=dp[i-1][1]+2*dp[i-1][2]+dp[i-1][4];dp[i][3]=... 阅读全文
posted @ 2012-08-06 10:34 LegendaryAC 阅读(437) 评论(0) 推荐(0) 编辑