HDU 4173 题意:已知n(n<=200)位參赛选手的住所坐标.现要邀请尽可能多的选手来參加一个party,而每一个选手对于离住所超过2.5Km的party一律不去,求最多能够有多少个选手去參加party. 思路: 最好还是先考虑party可能的位置,要尽可能多的邀请到选手參加,则仅仅需考虑party所在位置在某两位住所连线的中点上或某选手住所所在位置,由于这是最大參加party选手数非常有可能在的位置. 若其它位置能得到最大參加选手数.那么中点或选手住所也一定可得到. //反证法可得.试着…
HDU 5130 Signal Interference(计算几何 + 模板) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5130 Description Two countries A-Land and B-Land are at war. The territory of A-Land is a simple polygon with no more than 500 vertices. For military use, A-Land co…
第一次写计算几何,ac,感动. 不过感觉自己的代码还可以美化一下. 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=5128 题意: 在一个坐标系中,有n个点,从中找到两个互不touch,互不cross的两个矩形(边要和坐标轴平行),使得面积最大. 思路: 枚举每个点,n的四次方,这题有个坑点是“回型矩阵”,是真的坑,然后discuss区里说的十字形矩阵是骗人的. 每次对枚举的四个点进行check,如果两个矩阵的四个点相互不在对方的矩阵中,那么这组就是…
http://acm.hdu.edu.cn/showproblem.php?pid=5128 给出n个点,求n个点组成两个矩形的最大面积. 矩形必须平行x轴,并且不能相交,但是小矩形在大矩形内部是可以的,面积就为大矩形的面积. 我是枚举一条对角线,然后去找另外两个点是否在坐标中存在这样就可以确定一个矩形, 同理可以枚举出另外有一个矩形,但是要注意坐标不能重复, 判断矩形相交的话,只要判断一个矩形的4个点是否有在另一个矩形的范围内即可. #include<cstdio> #include<…
CSGO Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 127    Accepted Submission(s): 20 Problem Description Senior Pan is crazy about CSGO and she is so skilled. She can kill every enemy she sp…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4063 Description You are playing a flying game. In the game, player controls an aircraft in a 2D-space. The mission is to drive the craft from starting point to terminal point. The craft needs wireless s…
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents    by---cxlove 题目:给出n个城市需要去占领,有m条线段是障碍物,有p个士兵可以用.占领城市有个先后顺序,每个士兵有个背包,占领城市之后,仅能补给一次背包.问背包容量最少是多少,可以用这P个士兵完成任务,起点任意 . http://acm.hdu.edu.cn/showproblem.php?pid=4606 首先:枚举所有顶点,求一下距离,判断是否与线段相交.然…
Sqrt Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2221    Accepted Submission(s): 882 Problem Description Let's define the function f(n)=⌊n−−√⌋. Bo wanted to know the minimum number y wh…
Special Tetrahedron 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5839 Description Given n points which are in three-dimensional space(without repetition). Please find out how many distinct Special Tetrahedron among them. A tetrahedron is called Sp…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4763 题目大意: 给你一个字符串s,存在一个子串E同时出现在前缀.中间.后缀,即EAEBE这种模式,A和B可以是任意长度字符串. 解题思路: 其实就是把所有公共前后缀都枚举一遍,每次将s同时减去前缀和后缀,再将公共前后缀作为模式串进行kmp算法,如果能匹配到,则输出长度即可. 代码 #include<iostream> #include<cstdio> #include<cstr…