mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
32 lines
579 B
C++
32 lines
579 B
C++
|
#include <bits/stdc++.h>
|
||
|
using namespace std;
|
||
|
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int t;
|
||
|
scanf("%d",&t);
|
||
|
while(t--)
|
||
|
{
|
||
|
vector<int> vec;
|
||
|
int s;
|
||
|
for(int i=0; i<6; i++)
|
||
|
{
|
||
|
scanf("%d",&s);
|
||
|
vec.push_back(s);
|
||
|
}
|
||
|
sort(vec.begin(),vec.end());
|
||
|
int sum1=vec.at(5)+vec.at(4);
|
||
|
int sum2=vec.at(1)+vec.at(2)+vec.at(3);
|
||
|
if(sum1>sum2)
|
||
|
{
|
||
|
printf("Grandpa Shawn is the Winner!\n");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("What a sad story!\n");
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|