# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
887746 | ad_red | Tri (CEOI09_tri) | C++17 | 1197 ms | 7128 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 endl "\n"
using namespace std;
using ll = long long;
using ld = long double;
ll inf = 1e9;
struct Point{
ll x, y;
};
void pv(vector<Point> s) {
for (auto c : s) {
cout << "{" << c.x << ", " << c.y << "} ";
}
cout << endl;
}
ll vp(Point a, Point b) {
return a.x * b.y - a.y * b.x;
}
ll sgn(Point a, Point b, Point c) {
// -1 if the order is A-B-C from left to right if B is the bottom point
// 1 or 0 otherwise
ll q = vp(Point{a.x - b.x, a.y - b.y}, Point{c.x - b.x, c.y - b.y});
return (q / abs(q));
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |