# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
692603 | owoovo | Snowball (JOI21_ho_t2) | C++14 | 264 ms | 12712 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
using namespace std;
pair<ll,ll> BITmax[200010],BITmin[200010];
ll ori[200010],ans[200010]={};
void modify(pair<ll,ll> x,ll p){
while(p<=200005){
if(BITmax[p].first<x.first){
BITmax[p]=x;
}
if(BITmin[p].first>x.first){
BITmin[p]=x;
}
p+=p&(-p);
}
return ;
}
pair<pair<ll,ll>,pair<ll,ll>> q(ll p){
pair<ll,ll> ansmax={0,0},ansmin={0,0};
while(p){
if(ansmax.first<BITmax[p].first){
ansmax=BITmax[p];
}
if(ansmin.first>BITmin[p].first){
ansmin=BITmin[p];
}
p-=p&(-p);
}
return make_pair(ansmax,ansmin);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |