# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
288205 | NemanjaSo2005 | Foehn Phenomena (JOI17_foehn_phenomena) | C++14 | 538 ms | 15736 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>
#define ll long long
#define LIMIT 7000000
using namespace std;
ll koliko[200005],povecaj,res=0,T,S,N,Q,u1,u2,r1,r2,r3,r4,segmentno[400010];
char buffer[LIMIT],*pos;
ll nadji(int gde){
ll ret=0;
while(gde){
ret+=segmentno[gde];
gde/=2;
}
return ret;
}
void dodaj(int gde,int lb,int db,int l,int r){
if(lb>db or l>r)
return;
if(lb==l and db==r){
segmentno[gde]+=povecaj;
return;
}
int mid=(l+r)/2;
dodaj(gde*2,lb,mid,l,min(mid,r));
dodaj(gde*2+1,mid+1,db,max(l,mid+1),r);
return;
}
ll getll(){
ll positive=1,number;
while(*pos!='-' and *pos<48)
*pos++;
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... |