题解 | #长方形的关系#

长方形的关系

https://www.nowcoder.com/practice/6b099f3a8e3745b592203f14e3954411

// write your code here......

char* cancover(rectangle b){
    if(length<width)
        swap(length,width);
    int b_length=b.getlength(),b_width=b.getwidth();
    if(b_length<b_width)
        swap(b_length,b_width);
    if(length>=b_length && width>=b_width)
        return "yes";
    return "no";
}

全部评论

相关推荐

点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务