# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
487107 | Cross_Ratio | Printed Circuit Board (CEOI12_circuit) | C++14 | 54 ms | 8260 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>
#define int long long
using namespace std;
int X[200005];
int Y[200005];
int cmp(int x, int y) { // x < y : True
int k = Y[y]*X[x]-Y[x]*X[y];
if(k > 0) return 1;
else if(k == 0) return 0;
return -1;
}
int ccw(int x, int y, int m) {
int x1 = X[x]-X[y];
int y1 = Y[x]-Y[y];
int x2 = X[m]-X[x];
int y2 = Y[m]-Y[x];
return x1*y2-x2*y1;
}
int ccw2(pair<int, int> a, pair<int, int> b, pair<int, int> c) {
int op = a.first*b.second + b.first*c.second + c.first*a.second;
op -= (a.second*b.first + b.second*c.first + c.second*a.first);
if (op > 0)return 1;
else if (op == 0)return 0;
else return -1;
}
int isIntersect(pair<pair<int, int>, pair<int, int>> x, pair<pair<int, int>, pair<int, int>> y) {
pair<int, int> a = x.first;
pair<int, int> b = x.second;
pair<int, int> c = y.first;
pair<int, int> d = y.second;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |