0
点赞
收藏
分享

微信扫一扫

A. Food for Animals

卿卿如梦 2022-05-06 阅读 49
c++算法
#include<iostream>
using namespace std;
int main(){
    int t=0;
    cin>>t;
    while(t--){
        int a=0,b=0,c=0,x=0,y=0;
        cin>>a>>b>>c>>x>>y;
        if(a>=x){
            if(b+c>=y) cout<<"yes\n";
            else cout<<"no\n";
        }else{
            if(a+c>=x){
                c=a+c-x;
                if(b+c>=y) cout<<"yes\n";
                else cout<<"no\n";
            }else cout<<"no\n";
        }
    }
    return 0;
}
举报

相关推荐

0 条评论