# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
169066 | Akashi | Cake 3 (JOI19_cake3) | C++14 | 1768 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 <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
struct cake{
int pv, v, c, p;
bool operator < (const cake &aux)const{
if(c != aux.c) return c < aux.c;
return v < aux.v;
}
};
cake a[200005], v[200005];
bool cmp(cake x, cake y){
if(x.v != y.v) return x.v < y.v;
if(x.c != y.c) return x.c < y.c;
return x.p < y.p;
}
int n, m;
long long Arb[800005];
int cnt[800005];
void update(int p, int v, int st = 1, int dr = n, int nod = 1){
if(st == dr){
Arb[nod] += v;
if(v > 0) ++cnt[nod];
else --cnt[nod];
return ;
}
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... |