摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1111Problem DescriptionThe Sarcophagus itself is locked by a secret numerical code. When somebody wants... 阅读全文
posted @ 2015-05-30 22:15 繁夜 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.swust.edu.cn/contest/0226/problem/1139/There is a row of n coins whose values are some positive integers c₁, c₂,...,cn, not necessari... 阅读全文
posted @ 2015-05-30 21:45 繁夜 阅读(890) 评论(0) 推荐(0) 编辑
摘要: Time limit(ms): 1000 Memory limit(kb): 65535The cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (pr... 阅读全文
posted @ 2015-05-30 21:35 繁夜 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.swust.edu.cn/problem/1132/Time limit(ms): 1000 Memory limit(kb): 65535Several coins are placed in cells of an n×m board. A rob... 阅读全文
posted @ 2015-05-30 21:23 繁夜 阅读(1152) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.swust.edu.cn/problem/0249/麦兜是个淘气的孩子。一天,他在玩钢笔的时候把墨水洒在了白色的墙上。再过一会,麦兜妈就要回来了,麦兜为了不让妈妈知道这件事情,就想用一个白色的凸多边形把墙上的墨点盖住。你能告诉麦兜最小需要面积多大的凸多边形才能把这... 阅读全文
posted @ 2015-05-30 21:09 繁夜 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 这里先介绍点概念(一般是点集覆盖问题)输入各个点的坐标1. 将各点排序(必须的) ,为保证形成圈,把 P0 在次放在点表的尾部;2. 准备堆栈:建立堆栈 S,栈指针设为t,将0、1、2 三个点压入堆栈 S;3. 对于下一个点 i 只要 S[t-1]、S[t]、i不做左转 就反复... 阅读全文
posted @ 2015-05-30 20:56 繁夜 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 关于位运算可以戳戳这里:http://www.cnblogs.com/zyxStar/p/4564335.html在很多情况下(比如翻棋子)在搜索时涉及大量枚举往往导致超时,位运算则很好地解决了这个问题,方便又快捷HDU 1882 Strange Billboardhttp://acm.hdu.ed... 阅读全文
posted @ 2015-05-30 20:31 繁夜 阅读(303) 评论(0) 推荐(0) 编辑