Submission #896350

# Submission time Handle Problem Language Result Execution time Memory
896350 2024-01-01T09:53:09 Z karamkallasi Event Hopping (BOI22_events) C++17
0 / 100
37 ms 10672 KB
#include <bits/stdc++.h>
#define T ll tt ; cin>>tt ; while(tt--)
#define fast ios::sync_with_stdio(NULL); cin.tie(0); cout.tie(0);
#define endl '\n'
#define yes void (cout << "YES" << endl)
#define no void (cout << "NO" << endl)
#define pb push_back
#define F first
#define S second
#define ld long double
#define fixed(g) fixed<<setprecision(g)
#define ll long long
using namespace std;
const ll N = 2e6 + 9 ;
const ll oo = 1e18 + 7 ;
ll n , m , k , x , y , z , ind , ans , a[N] , b[N] , mn , sz;
string s;
vector< ll >v , vind;
bool ff , is , vis[N] ;
multiset<pair<ll , ll> >st ;
int main(){
fast
    cin >> n >> m ;
    for(ll i=1 ; i<=n ; i++){
        cin >> a[i] >> b[i] ;
    }
    while(m--){
        cin >> x >> y ;
        if(x==y)cout<<0<<endl ;
        else{
            if(a[y]<=b[x] && b[x]<=b[y])cout<<1<<endl ;
            else cout<<"impossible"<<endl;
        }
    }
    return 0 ;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 4444 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 4444 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 4444 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 4444 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 10672 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 4444 KB Output isn't correct
2 Halted 0 ms 0 KB -