# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389829 | ogibogi2004 | Food Court (JOI21_foodcourt) | C++14 | 959 ms | 112452 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;
#define ll long long
const ll MAXN=250060;
struct node
{
ll lazymax;
ll lazyadd;
ll maxhere;
};
node tree[4*MAXN];
void build(ll l,ll r,ll idx)
{
tree[idx].maxhere=0;
tree[idx].lazymax=0;
tree[idx].lazyadd=0;
if(l==r)return;
ll mid=(l+r)/2;
build(l,mid,idx*2);
build(mid+1,r,idx*2+1);
}
node merge(node n1,node n2)
{
node ret;
ret.maxhere=max(0ll,max(max(n1.maxhere,n1.lazymax)+n1.lazyadd,max(n2.lazymax,n2.maxhere)+n2.lazyadd));
ret.lazyadd=0;
ret.lazymax=0;
return ret;
}
void push_lazy(ll l,ll r,ll idx)
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |