Description   Problem B: Myacm Triangles Problem B: Myacm Triangles Source file: triangle.{c, cpp, java, pas} Input file: triangle.in Output file: triangle.out There has been considerable archeological work on the ancient Myacm culture. Many artifact…
Problem Description 小度熊喜欢恶作剧.今天他向来访者们提出一个恶俗的游戏.他和来访者们轮流往一个正多边形内放盘子.最后放盘子的是获胜者,会赢得失败者的一个吻.玩了两次以后,小度熊发现来访者们都知道游戏的必胜策略.现在小度熊永远是先手,他想知道他是否能获胜. 注意盘子不能相交也不能和多边形相交也不能放在多边形外.就是说,盘子内的点不能在多边形外或者别的盘子内. Input 第一行一个整数T ,表示T 组数据.每组数据包含3 个数n,a,r(4≤n≤100,0<a<1000,0…
Moon Game Description Fat brother and Maze are playing a kind of special (hentai) game in the clearly blue sky which we can just consider as a kind of two-dimensional plane. Then Fat brother starts to draw N starts in the sky which we can just consid…
Description Fat brother and Maze are playing a kind of special (hentai) game in the playground. (Maybe it’s the OOXX game which decrypted in the last problem, who knows.) But as they don’t like using repellent while playing this kind of special (hent…
Description   Given an integer N, your task is to judge whether there exist N points in the plane such that satisfy the following conditions: 1. The distance between any two points is no greater than 1.0. 2. The distance between any point and the ori…
Description Three wizards are doing a experiment. To avoid from bothering, a special magic is set around them. The magic forms a circle, which covers those three wizards, in other words, all of them are inside or on the border of the circle. And due…
Description There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minimal required length of the rope. However, he does not know how to calculate it. Can you help him?        The…
以下以目前遇到题目开始记录,按发布时间排序 ACM之递推递归 ACM之数学题 拓扑排序 ACM之最短路径做题笔记与记录 STL学习笔记不(定期更新) 八皇后问题解题报告…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5512 学习菊苣的博客,只粘链接,不粘题目描述了. 题目大意就是给了初始的集合{a, b},然后取集合里的两个元素进行加或者减的操作,生成新的元素.问最后最多能生成多少个元素.问答案的奇偶性. 首先一开始有a, b.那么如果生成了b-a(b>a),自然原来的数同样可以由b-a, a生成(b != 2a). 于是如此反复下去,最后的数必然是可以由两个数p, 2p生成的. 于是所有的数肯定可以表示成xp+…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5521 学习菊苣的博客,只粘链接,不粘题目描述了. 题目大意就是一个人从1开始走,一个人从n开始走.让最后相遇的时间最短. 题目就是个最短路,不过唯一不同的是,题目图的描述方式比较特别. 从规模上来看,想把这张图描述成邻接矩阵或者邻接表是不可能的. 必然只能按照题目要求的意思来存. 于是第一步存图的方式,我采用了两个vector数组,(当然此处可以使用链式前向星),一个存了和点相关的集合有哪些in[]…