[BestCoder] Round #4

1001

http://acm.hdu.edu.cn/showproblem.php?pid=4931

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <stdlib.h>
#include <cmath>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cctype>
using namespace std;
int s[6];

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


02 03 待补充

你可能感兴趣的:([BestCoder] Round #4)