Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
- #define eb emplace_back
- #define pi pair<ll,ll>
- #define mp make_pair
- int main()
- {
- ll t;
- cin>>t;
- while(t--)
- {
- ll v,c,f,s;
- cin>>v>>c>>f>>s;
- bool fl=false;
- ll mn =min(v,c);
- if(mn>=s)
- {
- if(v>c)c-=min(mn,s);
- else v-=min(mn,s);
- s=0;
- }
- if(s>0)
- {
- cout<<"No"<<endl;
- }
- else
- {
- //cout<<f<<" first"<<endl;
- if(v+c>=f)fl=false;
- else fl =true;
- if(fl)cout<<"No"<<endl;
- else cout<<"Yes"<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement