mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
parent
c25de8221a
commit
f33d8871be
22
HDOJ/4931_zgxue.cpp
Normal file
22
HDOJ/4931_zgxue.cpp
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int t, a[6];
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
scanf("%d", &t);
|
||||||
|
while (t--) {
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
scanf("%d", &a[i]);
|
||||||
|
sort(a, a + 6);
|
||||||
|
int aa = a[5] + a[4];
|
||||||
|
int bb = a[3] + a[2] + a[1];
|
||||||
|
if (aa > bb) printf("Grandpa Shawn is the Winner!\n");
|
||||||
|
else printf("What a sad story!\n");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user