# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
123215 | tmwilliamlin168 | Relay (COI16_relay) | C++14 | 95 ms | 9128 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;
#define ll long long
const int mxN=1e5;
int n, m, ans;
ll xa[mxN], ya[mxN], xb[2*mxN], yb[2*mxN];
struct ts {
int li, ri;
ll lx, ly, rx, ry;
};
ll cp(ll x1, ll y1, ll x2, ll y2, ll x3, ll y3) {
return (y3-y1)*(x2-x1)-(y2-y1)*(x3-x1);
}
ts gts(ll x, ll y) {
ts r;
if(cp(x, y, xb[m-1], yb[m-1], xb[0], yb[0])<0) {
//cout << x << " " << y << endl;
int lb=0, rb=m-2;
while(lb<rb) {
int mb=(lb+rb+1)/2;
if(cp(x, y, xb[m-1], yb[m-1], xb[mb], yb[mb])<0&&cp(x, y, xb[mb-1], yb[mb-1], xb[mb], yb[mb])<0)
lb=mb;
else
rb=mb-1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |