hiho week 142 register

Ended

Participants:332

Verdict:Accepted
Score:100 / 100
Submitted:2017-03-20 18:40:59

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 <cmath>
#include <algorithm>
using std::abs;
using std::swap;
const int maxn = 1010;
typedef long long LL;
struct Point
{
    int x, y;
    Point(int x = 0, int y = 0): x(x), y(y) {}
    void read() { scanf("%d%d", &x, &y); }
    Point operator - (const Point& t) const {
        return Point(x - t.x, y - t.y);
    }
};
int n, m;
Point p[maxn], dir[maxn];
int angle[maxn];
int sign(int x) { if(!x) return 0; return x > 0 ? 1 : -1; }
Point Normalize(Point A) {
    return Point(sign(A.x), sign(A.y));
}
int Cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX