随笔分类 - 算法:计算几何
摘要:再遇攻击Time Limit: 1000 MS Memory Limit: 65536 KTotal Submit: 253(37 users) Total Accepted: 56(29 users) Rating: Special Judge: NoDescriptionDota中英雄技能攻击会有一个范围,现在释放一个技能给出他的攻击范围和目标英雄的位置,问是否能攻击到。攻击范围保证是一个多边型。Input有多组测试数据第一行输入1个整数n, 期中n代表攻击范围是给出的n个点组成的多边形,按照时针方向(顺或逆)依次给出,(n>=3)N = 0输入结束。第二行a,b表示目标英雄的坐标(
阅读全文
摘要:Points WithinTime Limit:2 Seconds Memory Limit:65536 KBStatement of the ProblemSeveral drawing applications allow us to draw polygons and almost all o...
阅读全文
摘要:多边形Time Limit: 1000 MS Memory Limit: 65536 KTotal Submit: 113(42 users) Total Accepted: 51(38 users) Rating:Special Judge: NoDescription一个封闭的多边形定义是被有限个线段包围。线段的相交点称作多边形的顶点,当你从多边形的一个顶点沿着线段行走时,最终你会回到出发点。凸多边形(convex)想必大家已经很熟悉了,下图给出了凸多边形和非凸多边形实例。这里讨论的是在平面坐标的封闭凸多边形,多变形的顶点一个顶点在原点(x=0,y=0).图2显示的那样。这样的图形有两种性
阅读全文
摘要:蛋疼的蚂蚁Time Limit: 1000 MS Memory Limit: 65536 KTotal Submit: 39(22 users) Total Accepted: 26(21 users) Rating:Special Judge: NoDescription大千世界无奇不有,最近科学家发现一种蚂蚁,它头部只有一只左眼,并且三只脚在身子的右侧,因此:1,它不能转向右侧。2,它的行走会留下一条红印。3,它行走不会在经过以前走过的红印。这种蚂蚁需要每天吃一个食物,这个食物坐落在平面坐标系中,没有两个植物会在同一点。蚂蚁一天会找到一个食物,然后它就在那里过完一天,第二天它会再出发寻找食
阅读全文
摘要:围困Time Limit: 1000 MS Memory Limit: 65536 KTotal Submit: 360(138 users) Total Accepted: 157(129 users) Rating: Special Judge: NoDescriptionLeyni是一名猎人,一天他在草原中散步,遇到了三只老狼,三只老狼围成了一个三角形,如果Leyni在这个三角形中,那么他必死无疑,否则他还有一线生机。现在已知三只老狼的坐标和Leyni的坐标,请问,Leyni还有活下去的机会吗?Input本题有多组测试数据,对于每组测试数据:第一行,含有4对坐标,x1, y1, x2,
阅读全文
摘要:/*==========================*\ | 计算几何基础函数 | | 1.点和向量的定义 | | 2.向量的基本运算 | | 3.点积 | | 4.向量长度 | | ...
阅读全文
摘要:Space AntTime Limit:1000MSMemory Limit:10000KTotal Submissions:2876Accepted:1839DescriptionThe most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It has only one eye on the left side of it
阅读全文
摘要:Surround the TreesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6812Accepted Submission(s): 2594Problem DescriptionThere 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 minima
阅读全文
摘要:War on WeatherTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 300Accepted Submission(s): 162Problem DescriptionAfter an unprovoked hurricane attack on the south shore, Glorious Warrior has declared war on weather. The first salvo in this campaign w
阅读全文
摘要:Problem DMorley’s TheoremInput:Standard InputOutput:Standard OutputMorley’s theorem states that that the lines trisecting the angles of an arbitrary plane triangle meet at the vertices of an equilateral triangle. For example in the figure below the tri-sectors of angles A, B and C has intersected an
阅读全文
摘要:Pick-up sticksTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1872Accepted Submission(s): 706Problem DescriptionStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to
阅读全文
摘要:Beauty ContestTime Limit:3000MSMemory Limit:65536KTotal Submissions:26180Accepted:8081DescriptionBessie, Farmer John's prize cow, has just won first p...
阅读全文
摘要:Mirror and LightTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 650Accepted Submission(s): 316Problem DescriptionThe light travels in a straight line and always goes in the minimal path between two points, are the basic laws of optics.Now, our prob
阅读全文
摘要:爆头Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1447Accepted Submission(s): 601Problem Descriptiongameboy是一个CS高手,他最喜欢的就是扮演警察,手持M4爆土匪的头。也许这里有人没玩过CS,有必要介绍一下“爆头”这个术语:所谓爆头,就是子弹直接命中对方的头部,以秒杀敌人。现在用一个三维的直角坐标系来描述游戏中的三维空间(水平面为xoy平面,z轴正方向是上方)。假设游戏中角色的头是一个标
阅读全文
摘要:WallTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2848Accepted Submission(s): 811Problem DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, tha
阅读全文
摘要:You can Solve a Geometry Problem tooTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6425Accepted Submission(s): 3099Problem DescriptionMany geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this fina
阅读全文
摘要:Cupid's ArrowTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 849Accepted Submission(s): 306Problem Description传说世上有一支丘比特的箭,凡是被这支箭射到的人,就会深深的爱上射箭的人。世上无数人都曾经梦想得到这支箭。Lele当然也不例外。不过他想,在得到这支箭前,他总得先学会射箭。日子一天天地过,Lele的箭术也越来越强,渐渐得,他不再满足于去射那圆形的靶子,他开始设计各种各样
阅读全文
摘要:Lifting the StoneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4819Accepted Submission(s): 2006Problem DescriptionThere are many secret openings in the floor which are covered by a big heavy stone. When the stone is lifted up, a special mechanism
阅读全文
摘要:Jack StrawsTime Limit:1000MSMemory Limit:10000KTotal Submissions:2911Accepted:1322DescriptionIn the game of Jack Straws, a number of plastic or wooden "straws" are dumped on the table and players try to remove them one-by-one without disturbing the other straws. Here, we are only concerned
阅读全文
摘要:改革春风吹满地Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16308Accepted Submission(s): 8316Problem Description“ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地。谢谢!(乐队奏乐)”话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而且,还竟然来这么几句打油诗。好呀,老师的责任就是帮你解决问题,既然想种田,那就分你一块。这块田位于浙江省温州市苍南县
阅读全文

浙公网安备 33010602011771号