摘要:
#include#include#include#include#includeusing namespace std;#define dd double#define eps 1e-7#define maxn 220000int n;struct P{ dd x,y; }a[maxn];dd mul(P a1,P a2,P c){ return (a1.x-a2.x)*(c.y-a2.y)-(a1.y-a2.y)*(c.x-a2.x);}bool cross(P a1,P a2,P b1,P b2){ if(min(a1.x,a2.x)<=max(b1.x,b2.x)&& 阅读全文
摘要:
#include#include#include#includeusing namespace std;#define eps 1e-7#define dd double#define maxn 300int T;int n;structP{ dd x,y; }a[maxn];bool ling(dd x){ if(x>-eps&&x0)continue; if(r1>0&&r2<0)continue; p=1; } if(!p){ // cout<<i<<" "<<j<<en 阅读全文
摘要:
#include#include#include#define eps 1e-7#define maxn 8000using namespace std;#define ll long longstruct point{ ll x,y;};int n,m;ll x1,y1,x2,y2;point a[maxn],b[maxn];ll mul(ll a1,ll b1,ll a2,ll b2){return a1*b2-a2*b1;}bool left(point x,point y){if(mul(x.x-y.x,x.y-y1,y.y-y.x,y2-y1)>0)return 1;else 阅读全文