Codeforces Round #365 (Div. 2) -- A. Mishka and Game (水题)

来源:互联网 发布:幼儿园软件有哪些 编辑:程序博客网 时间:2024/05/29 18:15
A. Mishka and Game
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Mishka is a little polar bear. As known, little bears loves spending their free time playing dice for chocolates. Once in a wonderful sunny morning, walking around blocks of ice, Mishka met her friend Chris, and they started playing the game.

Rules of the game are very simple: at first number of rounds n is defined. In every round each of the players throws a cubical dice with distinct numbers from1 to 6 written on its faces. Player, whose value after throwing the dice is greater, wins the round. In case if player dice values are equal, no one of them is a winner.

In average, player, who won most of the rounds, is the winner of the game. In case if two players won the same number of rounds, the result of the game is draw.

Mishka is still very little and can't count wins and losses, so she asked you to watch their game and determine its result. Please help her!

Input

The first line of the input contains single integer nn (1 ≤ n ≤ 100) — the number of game rounds.

The next n lines contains rounds description.i-th of them contains pair of integers mi and ci (1 ≤ mi,  ci ≤ 6) — values on dice upper face after Mishka's and Chris' throws in i-th round respectively.

Output

If Mishka is the winner of the game, print "Mishka" (without quotes) in the only line.

If Chris is the winner of the game, print "Chris" (without quotes) in the only line.

If the result of the game is draw, print "Friendship is magic!^^" (without quotes) in the only line.

Examples
Input
33 52 14 2
Output
Mishka
Input
26 11 6
Output
Friendship is magic!^^
Input
31 53 32 2
Output
Chris
Note

In the first sample case Mishka loses the first round, but wins second and third rounds and thus she is the winner of the game.

In the second sample case Mishka wins the first round, Chris wins the second round, and the game ends with draw with score 1:1.

In the third sample case Chris wins the first round, but there is no winner of the next two rounds. The winner of the game is Chris.


大体题意:

给你n场比赛,告诉你每一场比赛的得分情况,如果第一个人赢了,输出

Mishka第一个人输了输出:
Chris
平局输出:
Friendship is magic!^^

思路:
炒鸡无敌大水题:
就是因为这道水题,导致cf崩了许久, 让自己一直交不上题 T _ T!!
#include<bits/stdc++.h>using namespace std;const int maxn = 1000 + 10;const int inf = 0x3f3f3f3f;const double eps = 1e-8;const double pi = acos(-1.0);int main(){    int n;    scanf("%d",&n);    int sum1 = 0,sum2 = 0;    for (int i = 0; i < n; ++i){        int u,v;        scanf("%d%d",&u,&v);        if (u > v)++sum1;        else if (u < v)++sum2;    }    if (sum1 > sum2){        printf("Mishka\n");    }else if (sum1 < sum2) printf("Chris\n");    else printf("Friendship is magic!^^\n");    return 0;}


0 0
原创粉丝点击