MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | RE
Submitted:2015-05-09 15:47:30

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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) {  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX