# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
226343 | Bruteforceman | Printed Circuit Board (CEOI12_circuit) | C++11 | 1092 ms | 5924 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n;
struct point {
long long x, y;
point () {}
point (long long x, long long y) : x(x), y(y) {}
point operator + (point p) const {
return point(x + p.x, y + p.y);
}
point operator - (point p) const {
return point(x - p.x, y - p.y);
}
} a[maxn];
int ord[maxn];
long long cross(point p, point q) { return p.x * q.y - p.y * q.x; }
long long dot(point p, point q) { return p.x * q.x + p.y * q.y; }
bool inSegment(point a, point b, point c) {
return cross(c - a, b - a) == 0 &&
dot(a - b, a - b) >= max(dot(a - c, a - c), dot(c - b, c - b));
}
int side(point a, point b, point c) {
long long x = cross(b - a, c - a);
if(x > 0) return 1;
else if (x < 0) return -1;
else return 0;
}
bool intersect(point a, point b, point c, point d) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |