# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
680293 | stevancv | Discharging (NOI20_discharging) | C++14 | 356 ms | 88384 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 ll long long
#define ld long double
#define sp ' '
#define en '\n'
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
#define sadd(a, b) a = Add(a, b)
#define smul(a, b) a = Mul(a, b)
using namespace std;
const int N = 1e6 + 2;
const int mod = 1e9 + 7;
ll a[N], dp[N];
struct Line {
ll a, b;
Line() {
a = b = 1e18;
}
Line(ll aa, ll bb) {
a = aa; b = bb;
}
ll F(int x) {
if (a == 1e18 && b == 1e18) return 1e18;
return a * x + b;
}
}st[4 * N];
void Add(int node, int l, int r, Line lin) {
int mid = l + r >> 1;
bool le = lin.F(l) < st[node].F(l);
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... |