# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
25948 | kdh9949 | Cake (CEOI14_cake) | C++14 | 706 ms | 5048 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;
int n, q, p, a[250010];
struct Dat{
int i;
bool operator<(const Dat &oth) const {
return a[i] < a[oth.i];
}
};
set<Dat> t10;
const int sz = 262144;
struct Seg{
int dat[2 * sz];
void upd(int x, int v){
x += sz; dat[x] = v;
for(x /= 2; x; x /= 2) dat[x] = max(dat[2 * x], dat[2 * x + 1]);
}
int get(int s, int e){
int ret = 0;
for(s += sz, e += sz; s <= e; s /= 2, e /= 2){
if(s % 2 == 1) ret = max(ret, dat[s++]);
if(e % 2 == 0) ret = max(ret, dat[e--]);
}
return ret;
}
int pos(int t, int v){
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... |