# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1102041 | woohyun_jng | Split the sequence (APIO14_sequence) | C++17 | 28 ms | 131072 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 int long long
#define MAX 100100
#define MAX_K 210
#define MOD 1000000007
#define INF 0x7f7f7f7f7f7f7f7f
#define endl '\n'
using namespace std;
typedef pair<int, int> pr;
typedef array<int, 3> tp;
typedef array<int, 4> ftp;
class ConvexHullTrick {
public:
vector<ftp> F;
int ftop = 0;
void insert(tp X) {
ftp K = {X[0], X[1], 0, X[2]};
while (!F.empty()) {
if (F.back()[0] == K[0]) {
if (F.back()[1] >= K[1])
return;
} else {
K[2] = (F.back()[1] - K[1]) / (K[0] - F.back()[0]);
if (F.back()[2] < K[2])
break;
}
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... |