# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
813691 | jun6873 | Harbingers (CEOI09_harbingers) | C++17 | 1087 ms | 25216 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;
using lint = long long;
using pint = pair<lint, lint>;
#define x first
#define y second
struct cht {
lint a[100004], b[100004];
int cnt = 0;
struct record {
int cnt, i;
lint a, b;
};
vector<record> rec;
void update(lint a0, lint b0) {
record r;
r.cnt = cnt;
while (cnt >= 2 and (b[cnt] - b[cnt - 1]) * (a0 - a[cnt]) <=
(b0 - b[cnt]) * (a[cnt] - a[cnt - 1]))
cnt--;
cnt++;
r.i = cnt;
r.a = a[cnt];
r.b = b[cnt];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |