# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
988482 | amirhoseinfar1385 | Growing Vegetables is Fun 5 (JOI24_vegetables5) | C++17 | 5099 ms | 86836 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>
#pragma GCC optimize("O6,unroll-loops")
#pragma GCC target("avx2")
using namespace std;
const int maxn=300000+10,maxh=maxn*2;
int all[maxn][2],n,inf=1e9,kaf=(1<<20),sz,kk=(1<<19)-1,lnk[maxn][2];
vector<int>allb,allc,alla;
struct segment{
int ps[(1<<21)],sum[(1<<21)];
void clear(){
memset(ps,0,sizeof(ps));
memset(sum,0,sizeof(sum));
}
void upd(int i,int w){
i+=kaf;
sum[i]+=w;
i>>=1;
while(i>0){
sum[i]+=w;
ps[i]=min(ps[(i<<1)],sum[(i<<1)]+ps[(i<<1)^1]);
i>>=1;
}
return ;
}
}segsb,segpb,segsc,segpc;
void clear(){
segsb.clear();
segpb.clear();
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... |