MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | TLE
Submitted:2015-05-09 16:10:54

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<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<cmath>
#define eps 1e-8
#define N 110
using namespace std;
int dlcmp(double x) {return x<-eps?-1:x>eps;}
double sqr(double x) {return x*x;}
struct Point
{
    double x,y;
    Point(){}
    Point(double a, double b):x(a),y(b){}
    Point operator - (const Point& p) const {return Point (x-p.x, y-p.y);}
    void input() {scanf("%lf%lf",&x,&y);}
};
double cross(Point a, Point b){return a.x*b.y-b.x*a.y;}
double dis(Point a,Point b){return sqrt(sqr(a.x-b.x)+sqr(a.y-b.y));}
Point pt[N],pln[N];
Point tower[N],city[N];
int cmp(const Point& a, const Point& b)
{
    if (dlcmp(cross(a-pt[0],b-pt[0]))==1||
        dlcmp(cross(a-pt[0],b-pt[0]))==0&&
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX