计算几何
sdau_fangshifeng
这个作者很懒,什么都没留下…
展开
-
hdu 1756 Cupid's Arrow (计算几何,点是是否完全在多边形内)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1756Cupid's ArrowProblem Description传说世上有一支丘比特的箭,凡是被这支箭射到的人,就会深深的爱上射箭的人。世上无数人都曾经梦想得到这支箭。Lele当然也不例外。不过他想,在得到这支箭前,他总得先学会射箭。日子一天天地过,Lele的箭术也越来越强,渐...原创 2019-01-17 10:56:21 · 141 阅读 · 0 评论 -
线段,射线,直线的关系
二维坐标系#include<bits/stdc++.h>using namespace std;#define LL long long#define EPS 1e-8struct Point//二维坐标点{ double x; double y; Point(){} Point(double x,double y):x(x),y(y)...原创 2019-08-27 17:16:50 · 1688 阅读 · 0 评论 -
Out-out-control cars 计算几何(射线与线段相交判定)
题目链接:https://nanti.jisuanke.com/t/A1248DescriptionTwo out-of-control cars crashed within about a half-hour Wednesday afternoon on DeerPark Avenue. This accident alarmed the district governme...原创 2019-08-27 11:12:23 · 1266 阅读 · 0 评论 -
最小球覆盖 (退火算法)
#include<algorithm>#include<cstdio>#include<cstring>#include<cmath>#include<cstdlib>#include<iostream>#include<iomanip>#include<list>#include&l...原创 2019-08-20 12:08:14 · 340 阅读 · 0 评论 -
Codeforces Round #152 (Div. 2) C. Robo-Footballer (二维几何)
题目链接:http://codeforces.com/problemset/problem/248/CC. Robo-FootballerIt's a beautiful April day and Wallace is playing football with his friends. But his friends do not know that Wallace actua...原创 2019-08-10 17:10:54 · 186 阅读 · 0 评论 -
51 nod 1298 圆与三角形
题目链接:http://www.51nod.com/Challenge/Problem.html#problemId=1298&judgeId=7712021298 圆与三角形给出圆的圆心和半径,以及三角形的三个顶点,问圆同三角形是否相交。相交输出"Yes",否则输出"No"。(三角形的面积大于0)。 ...原创 2019-07-29 17:06:22 · 197 阅读 · 0 评论 -
连续非负整数的异或和
记f(x, y)为x到y的所有整数的异或值。 f(1,n) = f(0,n); 当n为2^k-1(2的K次方减一)时; 0 到 2^k-1 共2^k个数 等于∑C(n,i) 可以看做在k个位置中放入i个0,最后求和 同时可以看做在空格位置中放入i个1;最后求和 即在每一位上1个0的个数都相等,每个位上有2^(k-1)个1,当k>=2时 1的个数...原创 2019-07-23 16:44:50 · 388 阅读 · 0 评论 -
处女座的签到题----叉乘求三点构成的三角行的面积
链接:https://ac.nowcoder.com/acm/contest/327/A来源:牛客网处女座的签到题时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述平面上有n个点,问:平面上所有三角形面积第k大的三角形的面积是多少?输入描述:第一行T,表示样例的个...原创 2019-01-25 19:12:14 · 418 阅读 · 0 评论 -
hdu 2036 凸多边形的面积
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2036改革春风吹满地Problem Description“ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地。谢谢!(乐队奏乐)”话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而且,还竟然来这么几句打油诗。好呀,老师的责任就是帮你...原创 2019-01-17 10:59:12 · 127 阅读 · 0 评论 -
hdu 1154& Poj2462 Cutting a Polygon 计算几何模板集合
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1154用到了直线与线段的关系,直线与线段的交点,点是否在多边形内部,点是否在线段上等的模板 Cutting a Polygon Time Limit:1000MS Memory Limit:65536K Total Submissio...原创 2019-08-28 17:17:11 · 242 阅读 · 0 评论