# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
950037 | crimson231 | Printed Circuit Board (CEOI12_circuit) | C++17 | 31 ms | 2908 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.
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <vector>
#include <cassert>
typedef long long ll;
const ll INF = 1e17;
const int LEN = 2e5 + 1;
int N;
bool V[LEN];
struct Pos {
int x, y, i;
Pos(int X = 0, int Y = 0, int I = 0) : x(X), y(Y), i(I) {}
ll operator * (const Pos& p) const { return { (ll)x * p.x + (ll)y * p.y }; }
ll operator / (const Pos& p) const { return { (ll)x * p.y - (ll)y * p.x }; }
Pos operator + (const Pos& p) const { return { x + p.x, y + p.y }; }
Pos operator - (const Pos& p) const { return { x - p.x, y - p.y }; }
ll Euc() const { return (ll)x * x + (ll)y * y; }
friend std::istream& operator >> (std::istream& is, Pos& p) {
is >> p.x >> p.y;
return is;
}
friend std::ostream& operator << (std::ostream& os, const Pos& p) {
os << p.x << " " << p.y;
return os;
}
}; const Pos O = { 0, 0 };
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |