# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
722610 | bachhoangxuan | Event Hopping 2 (JOI21_event2) | C++17 | 184 ms | 24512 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;
#define pii pair<int,int>
#define fi first
#define se second
const int maxn=100005;
const int maxl=20;
int n,k,L[maxn],R[maxn],nxt[2*maxn][maxl];
set<pii> s;
int cal(int l,int r){
int ans=0;
for(int i=18;i>=0;i--){
if(nxt[l][i]<=r){
ans+=(1<<i);
l=nxt[l][i];
}
}
return ans;
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
cin >> n >> k;
vector<int> p;
for(int i=1;i<=n;i++){
cin >> L[i] >> R[i];
p.push_back(L[i]);p.push_back(R[i]);
}
sort(p.begin(),p.end());
p.erase(unique(p.begin(),p.end()),p.end());
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |