题目
题目链接:https://codeforc.es/contest/1371/problem/C
代码
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<cctype>
#include<ctime>
#include<iostream>
#include<string>
#include<map>
#include<queue>
#include<stack>
#include<set>
#include<vector>
#include<iomanip>
#include<list>
#include<bitset>
#include<sstream>
#include<fstream>
#include<complex>
#include<algorithm>
#if __cplusplus >= 201103L
#include <unordered_map>
#include <unordered_set>
#endif
#define ll long long
#define int long long
using namespace std;
const int INF = 0x3f3f3f3f;
signed main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int t;
cin>>t;
while(t--){
int a,b,n,m;
cin>>a>>b>>n>>m;
if(a<b) swap(a,b);
int c=a-b;
if(c>n){
a-=n;
n=0;
}
else{
a-=c;
n-=c;
}
bool flag=0;
if(a!=b){
if(min(a,b)<m) flag=1;
}
else{
if(a+b<m+n) flag=1;
else if(a<m) flag=1;
}
if(!flag) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}
我讨厌这种题 烦烦
本文地址:https://blog.csdn.net/kosf_/article/details/107193323