# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
135986 | onjo0127 | Tri (CEOI09_tri) | C++11 | 202 ms | 14284 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;
using ll = long long;
using pll = pair<ll, ll>;
#define X first
#define Y second
#define sz(V) ((int)V.size())
struct query { int id; pll A, B; };
int CCW(pll A, pll B, pll C) {
long long tmp = A.X*B.Y + B.X*C.Y + C.X*A.Y - A.Y*B.X - B.Y*C.X - C.Y*A.X;
if(tmp < 0LL) return -1;
if(tmp == 0LL) return 0;
if(tmp > 0LL) return +1;
}
bool operator <(pll A, pll B) { return CCW({0, 0}, A, B) == 1; }
bool operator <=(pll A, pll B) { return CCW({0, 0}, A, B) >= 0; }
pll add(pll A, pll B, pll C) {
return {A.X + C.X - B.X, A.Y + C.Y - B.Y};
}
bool chk(vector<pll> &H, pll A, pll B) {
if(B < A) swap(A, B);
bool f = 0;
int l = 0, r = sz(H) - 1;
while(l <= r) {
int m = l+r >> 1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |