# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
47426 | bugmenot111 | Building Bridges (CEOI17_building) | C++17 | 170 ms | 78820 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 <cstdio>
#include <numeric>
#include <algorithm>
#define INF (1LL << 62)
#define MAXN 1000001
typedef long long i64;
struct line {
i64 a, b;
i64 f(int x) {
return 1LL * x * a + b;
}
void swap(line& l) {
std::swap(a, l.a);
std::swap(b, l.b);
}
line () {
a = 0;
b = INF;
}
line (i64 a1, i64 b1) {
a = a1;
b = b1;
}
};
line t[4 * MAXN];
i64 dp[MAXN];
i64 p[MAXN];
int h[MAXN];
void add_line(line nw, int v = 1, int l = 0, int r = MAXN) {
int m = (l + r) / 2;
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... |