# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
134109 | imeimi2000 | Popeala (CEOI16_popeala) | C++17 | 1044 ms | 16632 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 <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long llong;
const llong inf = 1e18;
int n, t, s;
int P[20001];
llong dp[51][20001];
struct dq {
int bt, tp;
llong val[20001];
int idx[20001];
void init() {
bt = tp = 0;
}
void push(int i, llong v) {
while (bt < tp && val[tp - 1] > v) --tp;
val[tp] = v;
idx[tp] = i;
++tp;
}
void pop(int i) {
if (bt < tp && idx[bt] == i) ++bt;
}
llong get() const {
if (bt < tp) return val[bt];
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... |