Description Updog is watching a plane object with a telescope. The field of vision in the telescope can be described as a circle. The center is at the origin and the radius is R. The object can be seen as a simple polygon of N vertexes. Updog wants t…
题目链接:POJ 1265 Problem Description Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new research and development facility the company has installed the latest s…
Cows Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7038 Accepted: 3242 Description Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are f…
Description Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are forced to save money on buying fence posts by using trees as fence posts wherever possibl…
Cows Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7739 Accepted: 3507 Description Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are f…
Problem Description This is a simple problem. Given two triangles A and B, you should determine they are intersect, contain or disjoint. (Public edge or point are treated as intersect.) Input First line contains an integer T (1 ≤ T ≤ 10), represents…
Problem - 2892 这道题的做法是以圆心为原点,对多边形进行三角剖分.题目描述中,多边形的可能是顺时针或者是逆时针给出,不过在我的做法里,是用有向面积来计算的,和常见的多边形面积的求法类似,不过就是多了三角形与圆交的情况.三角形于圆交的情况共三种(因为这里的三角形其中一个点是圆心,另外两个点是多边形上相邻的两个顶点,所以我们只考虑多边形的边与圆相交的情况):与多边形的边(一条线段)没有交点,一个交点,两个交点. 敲这份代码最大的问题是敲的过程中有很多小错误,导致最后花了将近小时来deb…
链接:https://www.nowcoder.com/acm/contest/141/J来源:牛客网 Eddy has graduated from college. Currently, he is finding his future job and a place to live. Since Eddy is currently living in Tien-long country, he wants to choose a place inside Tien-long country…
Problem - 3982 题意就是给出一个圆心在原点半径为R的圆形蛋糕,上面有一个cherry,对蛋糕切若干刀,最后要求求出有cherry的那块的面积占整个蛋糕的多少. 做法显而易见,就是一个半平面交,将有向直线的方向根据cherry的位置确定好,然后就进行半平面交,得到一个多边形. 再将多边形用之前几个代码的圆与多边形交,求出区域的大小,再除以整个蛋糕的面积即可. 注意,这样做的时候,精度是要用1e-6或者是1e-4,太高了反而过不了数据. ——written by Lyon…
题目链接: POJ:http://poj.org/problem? id=2546 ZOJ:problemId=597" target="_blank">http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=597 Description Your task is to write a program, which, given two circles, calculates the area of the…
Intersection Time Limit: 4000/4000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others) Problem Description Matt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous examp…