上一页 1 2 3 4 5 6 ··· 47 下一页

2015年6月16日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5015矩阵是表示状态转移的利器这题m很大,n非常小,所以开始的思考角度是能否从当前列推出下一列。有了这个角度,矩阵构造是很简单的#include #include #include using namespace ... 阅读全文
posted @ 2015-06-16 16:29 LegendaryAC 阅读(350) 评论(0) 推荐(0) 编辑

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 阅读(141) 评论(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 阅读(253) 评论(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 阅读(172) 评论(0) 推荐(0) 编辑

2015年6月10日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1536http://acm.hdu.edu.cn/showproblem.php?pid=1944一样的题题意:先给一个集合,代表可能发生的转移。然后m个询问,可以理解为每次给l堆石子,每堆有hi个,问博弈策略直接... 阅读全文
posted @ 2015-06-10 23:55 LegendaryAC 阅读(166) 评论(0) 推荐(0) 编辑

2015年6月9日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1538经典经济学问题,海盗分金分析http://www.guokr.com/article/41423/#include #include using namespace std;int a[15];int mai... 阅读全文
posted @ 2015-06-09 00:11 LegendaryAC 阅读(201) 评论(0) 推荐(1) 编辑

2015年6月7日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2177威佐夫博奕,面对奇异局势既bk=ak+k时是必败点,其中bk>=ak,k=bk-ak别的处理和其他博弈相同,注意题目的数据取一堆的时候数据有问题#include #include #include #incl... 阅读全文
posted @ 2015-06-07 10:40 LegendaryAC 阅读(167) 评论(0) 推荐(0) 编辑

2015年6月2日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2176nim博弈的模型。要输出先手第一次取的情况,考虑角度是留给对手必败态#include #include using namespace std;int a[200005];int main() { in... 阅读全文
posted @ 2015-06-02 22:43 LegendaryAC 阅读(125) 评论(0) 推荐(0) 编辑

2015年2月3日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1209水题,按五个时针分针成的锐角从小到大排序,角度相同时间从早到晚,输出中间的那个时针一小时走30度,一分钟走0.5度,分针一分钟走6度,注意是锐角,大于180要用360减回去,为避免精度出问题统一乘2拒绝小数#... 阅读全文
posted @ 2015-02-03 00:39 LegendaryAC 阅读(168) 评论(0) 推荐(0) 编辑

2015年2月1日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1254暴搜,状态是四维的(箱子和人的坐标),向一个方向推箱子还要判断人能否走到推的位置,1A#include #include #include #include using namespace std;int n... 阅读全文
posted @ 2015-02-01 17:16 LegendaryAC 阅读(224) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 47 下一页