![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
几何问题
_Index_
这个作者很懒,什么都没留下…
展开
-
LA 2797 怪物陷阱(平面直线PSLG)
题目:https://vjudge.net/problem/UVALive-2797把直线的每两个端点点处理一遍,因为只有贴着端点才能过。若遇到直线端点相交情况,把每条线段稍微延长一点,通过判断是否相交即可判断是否可以通过#include<bits/stdc++.h>using namespace std;struct Point{ double x,y; Point(double x=0,double y=0) :x(x),y(y){}}; int n;typed原创 2020-05-25 01:03:01 · 142 阅读 · 0 评论 -
LA 3890 离海最远的点(半平面交)
题目:https://vjudge.net/problem/UVALive-3890二分法,通过收缩凸边型,直到半平面交为空集。#include<bits/stdc++.h>using namespace std;#include<bits/stdc++.h>using namespace std;struct Point{ double x,y; Point(double x=0,double y=0) :x(x),y(y){}};typedef P原创 2020-05-22 21:12:25 · 117 阅读 · 0 评论 -
UVA 10652 Board Wrapping(凸包)
#include<bits/stdc++.h>using namespace std;struct Point{ double x,y; Point(double x=0,double y=0) :x(x),y(y){}};typedef Point Vector;Vector operator +(Vector A,Vector B){return Vector(A.x+B.x,A.y+B.y);}Vector operator -(Vector A,Vector B){.原创 2020-05-21 15:05:50 · 94 阅读 · 0 评论 -
UVA 12304 2D Geometry 110 in 1!(与圆有关二维几何问题)
关于InscribedCircle:O是ABC内心的充要条件是:aOA+bOB+cOC=0 (均表示向量)设ABC的坐标为:A(x1,y1),B(x2,y2),C(x3,y3) BC=a,CA=b,AB=c内心为O(x,y)则有aOA+bOB+cOC=0(三个向量)MA=(x1-x,y1-y)MB=(x2-x,y2-y)MC=(x3-x,y3-y)则:a(x1-x)+b(x2-x)+c(x3-x)=0,a(y1-y)+b(y2-y)+c(y3-y)=0∴x=(ax1+bx2+cx3)...原创 2020-05-21 00:14:47 · 143 阅读 · 0 评论 -
UVA 11178 Morley定理(几何入门)
#include<bits/stdc++.h>using namespace std;struct Point{ double x,y; Point(double x=0,double y=0) :x(x),y(y){}};typedef Point Vector;Vector operator +(Vector A,Vector B){return Vector(A.x+B.x,A.y+B.y);}Vector operator -(Vector A,Vector B){.原创 2020-05-15 23:23:04 · 117 阅读 · 0 评论