# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
707089 | amirhoseinfar1385 | Fortune Telling 2 (JOI14_fortune_telling2) | C++17 | 941 ms | 45240 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>
using namespace std;
int n,m;
vector<pair<int,int>>all;
vector<int>allm;
int kaf=(1<<18);
struct segment
{
struct node{
vector<int>v;
};
node seg[(1<<19)];
void upd(int i,int w){
if(i==0){
return ;
}
seg[i].v.push_back(w);
return upd((i>>1),w);
}
void pre(){
for(int i=0;i<(1<<19);i++){
sort(seg[i].v.begin(),seg[i].v.end());
}
}
int porsakh(int i,int l,int r,int tl,int tr,int hadl,int hadr){
if(l>r||l>tr||r<tl){
return -1;
}
int p=lower_bound(seg[i].v.begin(),seg[i].v.end(),hadl)-seg[i].v.begin();
int pp=upper_bound(seg[i].v.begin(),seg[i].v.end(),hadr)-seg[i].v.begin();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |