Submission #988482

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9884822024-05-24 20:26:12amirhoseinfar1385Growing Vegetables is Fun 5 (JOI24_vegetables5)C++17
30 / 100
5099 ms86836 KiB
#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();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'void fastscan(int&)':
Main.cpp:36:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   36 |     register int c;
      |                  ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...