제출 #655392

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6553922022-11-04 07:45:51bachhoangxuan가로등 (APIO19_street_lamps)C++17
100 / 100
4212 ms63184 KiB
#include<bits/stdc++.h>
using namespace std;
#define maxn 300005
#define fi first
#define se second
typedef pair<int,int> pii;
typedef vector<int> vi;
struct query{
int t,a,b,id,pt;
bool operator<(query o){
if(a!=o.a) return a>o.a;
else return t>o.t;
}
};
bool cmp(query x,query y){
if(x.b!=y.b) return x.b<y.b;
else return x.t>y.t;
}
struct segtre{
int tree[4*maxn],lazy[4*maxn];
void pushdown(int l,int r,int id){
if(lazy[id]==0) return;
int mid=(l+r)>>1,lz=lazy[id];lazy[id]=0;
lazy[id<<1]+=lz;lazy[id<<1|1]+=lz;
tree[id<<1]+=lz*(mid-l+1);tree[id<<1|1]+=lz*(r-mid);
}
int query(int l,int r,int id,int p){
if(l==r) return tree[id];
pushdown(l,r,id);
int mid=(l+r)>>1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...