# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
656395 | buidangnguyen05 | Discharging (NOI20_discharging) | C++17 | 119 ms | 37300 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;
typedef long long ll;
const int N = 1e6 + 10;
int a[N]; ll f[N];
struct Line {
ll A, B;
Line() : A(0), B(0) {}
Line (ll _a, ll _b) {
A = _a, B = _b;
}
};
struct ConvexHullTrick {
Line st[N]; int sz, it = 1;
long double G (Line x, Line y) {
return 1.0 * (x.B - y.B) / (y.A - x.A);
}
ll calc(Line x, ll v) {
return x.A * v + x.B;
}
void add(ll x, ll y) {
Line cur = Line(x, y);
if (sz && st[sz].A == x && st[sz].B <= y) return;
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |