Csu1577:dice Game

Source: Internet
Author: User

Description

Input

Output

Sample Input
1 4 1 41 6 1 6
Sample Output
Emma
HINT

Source

NCPC 2014


Test instructions: Two people throw dice, each has two dice, to the size of the outstanding son, ask who win face bigger

Idea: Originally intended to use expectations, but then feel directly to take the middle and see who big can


#include <iostream> #include <stdio.h> #include <string.h> #include <stack> #include <queue > #include <map> #include <set> #include <vector> #include <math.h> #include <algorithm >using namespace std, #define LS 2*i#define rs 2*i+1#define up (i,x,y) for (i=x;i<=y;i++) #define DOWN (i,x,y) for (i=x; i>=y;i--) #define MEM (a,x) memset (A,x,sizeof (a)) #define W (a) while (a) #define LL long longconst double pi = acos (-1.0); #     Define Len 20005#define mod 19999997const int INF = 0x3f3f3f3f; #define EXP 1e-6 int main () {double a,b,c,d,e,f,g,h,x,y; W (~scanf ("%lf%lf%lf%lf%lf%lf%lf%lf", &a,&b,&c,&d,&e,&f,&g,&h)) {x = (a+b)/2+        (c+d)/2;        y = (e+f)/2+ (g+h)/2;        x = XY;        if (fabs (x) <exp) printf ("tie\n");        else if (x>0) printf ("gunnar\n");    else printf ("emma\n"); } return 0;}


Csu1577:dice Game

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.