제출 #1125017

#제출 시각아이디문제언어결과실행 시간메모리
1125017EfeBabagilEvent Hopping (BOI22_events)C++20
0 / 100
210 ms3764 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int n,q; cin>>n>>q; vector<array<int,3>> events(n); for(int i=0;i<n;i++) { int e,s; cin>>e>>s; events[i]={e,s,i}; } while(q--) { int a,b; cin>>a>>b; a--; b--; if(a==b) cout<<"0"<<endl; else if(events[b][1]>=events[a][1]&&events[b][1]<=events[a][0]) cout<<"1"<<endl; else cout<<"impossible"<<endl; } return 0; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...