【水题】HDU4931Happy Three Friends【BestCoder Round #4】

来源:互联网 发布:淘宝小额借贷 编辑:程序博客网 时间:2024/05/16 05:17

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4931

#include<iostream>#include<algorithm>using namespace std;int a[10];int main(){    int t;    cin>>t;    while(t--){        for(int i=0;i<6;i++){            cin>>a[i];        }        sort(a,a+6);        int Max=a[5]+a[4];        int Min=a[3]+a[2]+a[1];        if(Max>Min) cout<<"Grandpa Shawn is the Winner!"<<endl;        else cout<<"What a sad story!"<<endl;    }    return 0;}


阅读全文
0 0
原创粉丝点击