# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
40900 | Hassoony | Deda (COCI17_deda) | C++14 | 910 ms | 62412 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>
#include<unordered_map>
using namespace std;
typedef long long ll;
typedef double D;
const ll inf=(1ll<<61);
const int mod=1e9+7;
const int MX=2e5+9;
int n,q,ind,val,low;
char Q[MX];
int X[MX],A[MX],B[MX],Y[MX];
vector<int>v;
set<int>bit[MX*2];
void up(int x,int val){
while(x<MX*2){
bit[x].insert(val);
x+=x&-x;
}
}
int get(int x,int low){
int ret=MX*2;
while(x){
auto pp=bit[x].lower_bound(low);
if(pp!=bit[x].end())ret=min(ret,*pp);
x-=x&-x;
}
return ret;
}
int main(){
cin>>n>>q;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |