
计算几何
文章平均质量分 88
huatian5
run
展开
-
POJ-2007 Scrambled Polygon(计算几何)
Scrambled PolygonTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 8217 Accepted: 3903DescriptionA closed polygon is a figure bounded by a finite number of原创 2016-07-28 20:47:37 · 430 阅读 · 0 评论 -
HDU 4720 Naive and Silly Muggles(圆心)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4720 题意:给你三个点,求确定最小的圆(圆上或者圆内),让判断一个点是否在圆外 思路:如果三点组成的三角形中有钝角,那么圆心为最长边的中点;如果没有钝角,那么圆心就是外接圆圆心 代码:#include<bits/stdc++.h>using namespace std;struct point{原创 2017-09-24 12:36:49 · 229 阅读 · 0 评论 -
HDU 6206 Apple(外心)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6206 题意:三个点在一个圆上,让求一个点是否在圆外 思路:就是求外接圆圆心和半径,判断点到圆心的距离是否大于半径 圆心坐标(a,b),半径为r,点(x,y),公式为: a = ((y2-y1)(y3*y3-y1*y1+x3*x3-x1*x1) - (y3-y1)(y2*y2-y1*y1+x2*x2-原创 2017-09-24 12:30:41 · 320 阅读 · 0 评论 -
FZU 2231 平行四边形数(几何)(思维)
Problem 2231 平行四边形数Accept: 168 Submit: 531Time Limit: 2000 mSec Memory Limit : 32768 KB Problem Description在一个平面内给定n个点,任意三个点不在同一条直线上,用这些点可以构成多少个平行四边形?一个点可以同时属于多个平行四边形。 Input原创 2016-09-05 22:01:58 · 537 阅读 · 0 评论 -
POJ-3304 Segments(计算几何)
SegmentsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13113 Accepted: 4191DescriptionGiven n segments in the two dimensional space, write a program, w原创 2016-08-25 11:29:58 · 482 阅读 · 0 评论 -
UVALive 3263 That Nice Euler Circuit(计算几何)
vj的地址好看的一笔画让求闭合曲线形成的图形将整个平面分成了几步分。利用到了欧拉定理:n - m + r = 2;平面数为r = 2 - n + m顶点数n 和 边数m 的求法特别点。要去除在直线中间的点,这利用了 unique函数简解#include#include#include#includeusing namespace std;cons原创 2016-08-11 22:26:22 · 508 阅读 · 0 评论 -
UVA-11178 - Morley's Theorem(计算几何)
11178莫雷定理,最早是英国数学家莫勒(Morley)于1904年发现的,内容为三角形三个角的三等分线共有6条,每相邻的(不在同一个角的)两条三等分线的交点,是一个等边三角形的顶点。让求DEF三点,思路还是很简单的,先求一个点,例D,先用逆转的方法求BD,CD,再求交点。#include#include#includeusing namespace std;con原创 2016-08-11 16:28:43 · 560 阅读 · 0 评论 -
计算几何简单模板
刘汝佳书上的模板用着还是不错的,先以这个基础模板,以后自己再补充#include#include#include#includeusing namespace std;const double eps = 1e-6;struct Point{ double x,y; Point(double xx=0,double yy=0):x(xx),y(yy){}};原创 2016-08-11 16:22:32 · 383 阅读 · 0 评论 -
HDU 2108 Shape of HDU(凸包)
思路:肯定有规律啊(因为不会凸包),这个多边形的相邻两条边的斜率是越来越小的,后一条边总是小于前一条边的斜率,有的人用叉乘来解释的,原理貌似是一样的,都是边的方向。PS:拓展一下,开始想的按照相对的点连起来的直线斜率也是符合这种规律的此时判断相对的点,就是对称的两点/*这貌似没用到凸包的经典算法啊啊啊*/#include#include#include#includ原创 2016-06-27 19:52:29 · 495 阅读 · 0 评论 -
POJ-1569 Myacm Triangles(计算几何)
Myacm TrianglesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 1049 Accepted: 590DescriptionThere has been considerable archeological work on the an原创 2016-07-28 20:35:48 · 529 阅读 · 0 评论 -
POJ-2624 4th Point(计算几何)
4th PointTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4943 Accepted: 1735DescriptionGiven are the (x,y) coordinates of the endpoints of two adjacent si原创 2016-07-28 20:43:22 · 589 阅读 · 0 评论 -
HDU-5858 Hard problem(计算几何)
题目:https://vjudge.net/problem/469269/origin 题意:求阴影面积 思路:三角函数代码: 见http://blog.youkuaiyun.com/pnan222/article/details/52275172(图画出来也就出来 了#include<bits/stdc++.h>using namespace std;int main(){ int T;转载 2017-04-30 16:28:14 · 398 阅读 · 0 评论