# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
438868 | Snowfall | Foehn Phenomena (JOI17_foehn_phenomena) | C++14 | 753 ms | 19740 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;
long long seg[800005],seg2[800005];
long long arr[200005];
long long a,b;
void up(int st,int ed,int lv,int po,long long val,long long pval)
{
if(st>po || ed<po)
return;
if(st==po && ed==po)
{
if(val>pval)
seg[lv]=-a*(val-pval);
else
seg[lv]=-b*(val-pval);
return;
}
int md=(st+ed)/2;
int lv2=lv*2;
up(st,md,lv2,po,val,pval);
up(md+1,ed,lv2+1,po,val,pval);
seg[lv]=seg[lv2]+seg[lv2+1];
}
void upseg2(int st,int ed,int lv,int l,int r,long long val)
{
if(st>r || ed<l)
return;
if(st>=l && ed<=r)
{
seg2[lv]+=val;
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... |