链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=10 Area Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Jerry, a middle school student, addicts himself to mathematical research. Maybe the problems he has thought are…
Pipe Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 8280   Accepted: 2483 Description The GX Light Pipeline Company started to prepare bent pipes for the new transgalactic light pipeline. During the design phase of the new pipe shape th…
转载自 http://blog.csdn.net/william001zs/article/details/6213485 矢量 如果一条线段的端点是有次序之分的话,那么这种线段就称为 有向线段,如果有向线段p1p2的起点p1在坐标的原点,则可以把它称为矢量 p2 矢量的加减 设二维矢量 P = (x1, y1), Q = (x2, y2),则 P + Q = (x1 + x2, y1 + y2), P - Q = (x1 - x2, y1 - y2),且有 P + Q = Q + P, P -…
Geometric Shapes Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 1243   Accepted: 524 Description While creating a customer logo, ACM uses graphical utilities to draw a picture that can later be cut into special fluorescent materials. To…
Segment set Problem Description A segment and all segments which are connected with it compose a segment set. The size of a segment set is the number of segments in it. The problem is to find the size of some segment set.   Input In the first line th…
Treasure Hunt Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4797   Accepted: 1998 Description Archeologists from the Antiquities and Curios Museum (ACM) have flown to Egypt to examine the great pyramid of Key-Ops. Using state-of-the-ar…
Segments Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7739   Accepted: 2316 Description Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments…
题目链接:http://poj.org/problem?id=1265 题意是:有一个机器人在矩形网格中行走,起始点是(0,0),每次移动(dx,dy)的偏移量,已知,机器人走的图形是一个多边形,求这个机器人在网格中所走的面积,还有就是分别求多边形上和多边形内部有多少个网格点: 皮克定理: 在一个多边形中.用I表示多边形内部的点数,E来表示多边形边上的点数,S表示多边形的面积. 满足:S:=I+E/2-1; 求E,一条边(x1,y1,x2,y2)上的点数(包括两个顶点)=gcd(abs(x1-x…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1255 题目大意:给你若干个矩形,让你求这些矩形重叠两次及以上的部分的面积. 解题思路:模板题,跟HDU 1542  Atlantis一样是求面积并,唯一的差别是这题要求的是重叠两次以上的面积,只要将cnt>0的条件改为cnt>1即可. 代码: #include<cstdio> #include<cmath> #include<cstring> #include&…
Stan 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 find the top sticks, that is these sticks such that there is no stick on top of them. Stan has noticed that the la…