# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
856318 | Cyanmond | Building Bridges (CEOI17_building) | C++17 | 57 ms | 10700 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;
#define rep(i, l, r) for (int i = (l); i < (r); ++i)
#define per(i, l, r) for (int i = (r - 1); i >= l; --i)
#define ALL(x) (x).begin(), (x).end()
using i64 = long long;
struct CHT {
// naive
struct Line {
i64 a, b;
i64 eval(i64 x) {
return a * x + b;
}
};
int n, siz, lg;
vector<i64> xs;
vector<Line> data;
CHT(vector<i64> xs_) {
xs = xs_;
n = (int)xs.size();
lg = 0;
while ((1 << lg) < n) ++lg;
siz = 1 << lg;
while ((int)xs.size() < siz) xs.push_back(1ll << 30);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |