poj 1701【数学几何】】的更多相关文章

WisKey的眼神 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2059    Accepted Submission(s): 625 Problem Description WisKey的眼镜有500多度,所以眼神不大好,而且他有个习惯,就是走路喜欢看着地(不是为了拣钱哦^_^),所以大家下次碰见他的时候最好主动打下招呼,呵呵.但是…
Lifting the Stone Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5203    Accepted Submission(s): 2155 Problem Description There are many secret openings in the floor which are covered by a big…
The area Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6524    Accepted Submission(s): 4578题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1071 Problem Description Ignatius bought a land last w…
 FZU 2110  Star Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u  Practice Description Overpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sk…
题目 http://poj.org/problem?id=2002 题意 已知平面内有1000个点,所有点的坐标量级小于20000,求这些点能组成多少个不同的正方形. 思路 如图,将坐标按照升序排列后,首先枚举p1,p2, 并判断p2是否在p1正下方或者左上角(因为每个正方形只有一条最右边或者是右下的边),按照下图计算p3,p4,判断p3,p4是否存在即可. 感想 排序时要注意和左上角这个信息相符,刚写完时用的是左下角,与升序排序不符合,会遗失部分正方形. 代码 #include <cstdio…
Jack Straws Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5428   Accepted: 2461 Description In 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 witho…
GCC Time Limit: 1000MS Memory limit: 65536K 题目描述 The GNU Compiler Collection (usually shortened to GCC) is a compiler system produced by the GNU Project supporting various programming languages.  But it doesn’t contains the math operator “!”. In math…
题意: 给一条线段,和一个矩形,问线段是否与矩形相交或在矩形内. 解法: 判断是否在矩形内,如果不在,判断与四条边是否相交即可.这题让我发现自己的线段相交函数有错误的地方,原来我写的线段相交函数就是单纯做了两次跨立实验,在下图这种情况是错误的: 这样的话线段与右边界的两次跨立实验(叉积<=0)都会通过,但是并不相交. 所以要加快速排斥. 还有就是这题题目说给出的不一定是左上角,右下角依次的顺序.所以干脆重新自己定义左上角,右下角. 代码: #include <iostream> #inc…
题目链接:http://lightoj.com/volume_showproblem.php?problem=1385 题意:下图中已知面积 a b c 求 d; 如果d的面积不确定,输出-1. 连接AX,记△AFX的面积为m,△AEX的面积为n. 因为△AFX与△BFX共高线,所以m/a = AF/FB; 又因为(n+c)与b共底边,高线所在的三角形相似,高线只比为AF/FB = (n+c)/b = m/a. 同理可得(m+a)/b = n/c = AE/CE 然后解二元一次方程组求得 m =…
/* Every tenant went up N floors would make the dissatisfied degree rise N * a + 0.5 * N * (N - 1) degrees, every tenant went down N floors would make the dissatisfied degree rise N * b + 0.5 * N * (N - 1) degrees. △= Dp+1 – Dp = ∑1=<i<=p Ki*(b+p-i)…