编程介的小学生 2019-05-26 11:09 采纳率: 20.5%
浏览 137

数字的编号的排列组织问题,怎么采用 C语言的编写程序的技术方式来实现程序的呢?

Problem Description
Dong-hao , Grandpa Shawn , Beautful-leg Mzry are good friends. One day , they want to play a game.

There are 6 numbers on the table.

Firstly , Dong-hao can change the order of 6 numbers.

Secondly , Grandpa Shawn take the first one and the last one , sum them up as his scores.

Thirdly , Beautiful-leg Mzry take any of 3 numbers from the last 4 numbers , and sum them up as his scores.

Finally , if Grandpa Shawn's score is larger than Beautiful-leg Mzry's , Granpa Shawn wins!

If Grandpa Shawn's score is smaller than Beautiful-leg Mzry's , Granpa Shawn loses.

If the scores are equal , there is a tie.

Nowadays , it's really sad that Grandpa Shawn loses his love. So Dong-hao wants him to win(not even tie). You have to tell Dong-hao whether he can achieve his goal.

Input
There is a number T shows there are T test cases below. ( T <= 50)

For each test case , there are 6 numbers Ai ( 1 <= Ai <= 100 ).

Output
If Dong-hao can achieve his goal , output "Grandpa Shawn is the Winner!"
If he can not , output "What a sad story!"

Sample Input
3
1 2 3 3 2 2
2 2 2 2 2 2
1 2 2 2 3 4

Sample Output
What a sad story!
What a sad story!
Grandpa Shawn is the Winner!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 树莓派与pix飞控通信
    • ¥15 自动转发微信群信息到另外一个微信群
    • ¥15 outlook无法配置成功
    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题