
半平面交
LauZiyang
exploring
展开
-
省选专练[ZJOI2008]瞭望塔
模板能够满足条件的一定出自核是吧于是咱跑个半平面交。答案出自跑出来的凸壳的顶点上。#include<bits/stdc++.h> using namespace std; const double INF=1e16; const double eps=1e-8; const int N=20000; int n; double ans=INF; int cmp(double x){ ...原创 2018-03-21 15:37:26 · 190 阅读 · 0 评论 -
模板 向量
const double INF=1e16; const double eps=1e-8; const int N=60000; struct Point{ double x,y; Point(double _x=0,double _y=0):x(_x),y(_y){} friend Point operator +(Point A,Point B){return Point(A.x+B.x...原创 2018-03-21 20:09:24 · 165 阅读 · 0 评论 -
模板半平面交
void Shrink(int &num){ int siz=0; // cout<<lcnt<<endl; for(int i=1;i<=lcnt;i++){ // cout<<l[i].Ang<<endl; if(!siz){ siz++; temp[siz]=l[i]; } else{ if(!...原创 2018-03-21 20:10:01 · 188 阅读 · 0 评论