# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
346511 | wleung_bvg | Triangles (CEOI18_tri) | C++17 | 32 ms | 2348 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 "trilib.h"
#include <bits/stdc++.h>
using namespace std;
template<class C>constexpr int sz(const C&c){return int(c.size());}
using ll=long long;constexpr const char nl='\n',sp=' ';
namespace local_checker {
vector<pair<ll, ll>> P;
int query_count = 0;
int get_n() {
mt19937 rng(time(0));
int N = 40000;
for (int i = 0; i < N; i++) P.emplace_back(rng() % ll(1e9), rng() % ll(1e9));
return N;
}
bool _clockwise_points(const pair<ll, ll> &a, const pair<ll, ll> &b, const pair<ll, ll> &c) {
return (b.first - a.first) * (c.second - a.second) - (b.second - a.second) * (c.first - a.first) < 0;
}
bool is_clockwise(int a, int b, int c) {
assert(query_count++ < 1e6);
return _clockwise_points(P[a - 1], P[b - 1], P[c - 1]);
}
void give_answer(int s) {
vector<pair<ll, ll>> hull;
sort(P.begin(), P.end());
for (int phase = 0; phase < 2; phase++) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |