MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | TLE
Submitted:2015-05-09 15:11:34

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;
const double eps = 1e-8;
const int maxN = 11;
struct point_t {
    double x, y;
    point_t() { }
    point_t(double tx, double ty) : x(tx), y(ty) { }
    point_t operator-(const point_t &r) const { return point_t(x - r.x, y - r.y); }
    point_t operator+(const point_t &r) const { return point_t(x + r.x, y + r.y); }
    point_t operator*(const double r) const { return point_t(x * r, y * r); }
    point_t operator/(const double r) const { return point_t(x / r, y / r); }
    point_t rot90() const { return point_t(-y, x); }
    double l() const { return sqrt(x * x + y * y); }
    void read() { scanf("%lf%lf", &x, &y); }
} city[maxN], tower[maxN];
int tests, n, m, G, P;
int dblcmp(double x) {
    return (x < -eps ? -1 : x > eps);
}
double dist(point_t p1, point_t p2) {
    return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
double cross(point_t p1, point_t p2) {
    return p1.x * p2.y - p2.x * p1.y;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX