Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <bits/stdc++.h>using namespace std;typedef long long lint;const int MAX_N = 12;const double EPS = 1e-8;int n, m, g, p;struct point{ double x, y;};struct polygon{ point c[MAX_N], a; double area; int n;};struct segment{ point a, b;};bool dy(double x,double y) { return x > y + EPS;}bool xy(double x,double y) { return x < y - EPS;}bool dyd(double x,double y) { return x > y - EPS;}bool xyd(double x,double y) { return x < y + EPS;}bool dd(double x,double y) { return fabs( x - y ) < EPS;}polygon king;point c[MAX_N], y[MAX_N], q[MAX_N];double crossProduct(point a,point b,point c) {return (c.x - a.x)*(b.y - a.y) - (b.x - a.x)*(c.y - a.y);}double disp2p(point a,point b) {return sqrt( ( a.x - b.x ) * ( a.x - b.x ) + ( a.y - b.y ) * ( a.y - b.y ) );}double area_polygon(point p[],int n) {double s = 0.0;for (int i = 0; i < n; i++)s += p[(i+1)%n].y * p[i].x - p[(i+1)%n].x * p[i].y;return fabs(s)/2.0;}bool cmp(point a,point b) {