Submission #944095

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9440952024-03-12 08:26:52WarinchaiMeteors (POI11_met)C++14
74 / 100
3603 ms65536 KiB
#include<bits/stdc++.h>
#define int long long
using namespace std;
int own[300005];
vector<int>states[300005];
int least[300005];
struct segtree{
int info[1200005];
int lz[1200005];
void push(int st,int en,int i){
if(lz[i]!=0){
if(st==en)info[i]+=lz[i];
else {
lz[i*2+1]+=lz[i];
lz[i*2]+=lz[i];
}
lz[i]=0;
}
}
void upd(int st,int en,int i,int l,int r,int val){
push(st,en,i);
if(st>r||en<l)return;
if(st>=l&&en<=r)return lz[i]+=val,push(st,en,i),void();
int m=(st+en)/2;
upd(st,m,i*2,l,r,val);
upd(m+1,en,i*2+1,l,r,val);
}
int fval(int st,int en,int i,int pos){
push(st,en,i);
if(st==en)return info[i];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...