#include<bits/stdc++.h> using namespace std; int main(){ int len=0,l,r; int flag=1;//可以完成 int t,n; cin>>t; while(t--){ int ans=0; cin>>n; cin>>l>>r; len=r-l; int k=n-1; while(k--){ cin>>l>>r; if(len<r-l)flag=0; len=r-l; if(flag==0)cout<<"NO"<<endl; else cout<<"YES"<<endl; } } return 0; } /* Main.c:1:24: fatal error: bits/stdc++.h: No such file or directory #include<bits/stdc++.h> ^ compilation terminated. */ |
Double click to view unformatted code.