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 from 1 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 n n (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
3
3 5
2 1
4 2
output
Mishka
input
2
6 1
1 6
output
Friendship is magic!^^
input
3
1 5
3 3
2 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.

A题居然这么水!!昨晚cf挤爆好不容易刷进去发现A题就是一道比较大小??!居然还到了七分钟才交TAT。

水AC代码:

 #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std; int main(){
int n,b,c;
cin>>n;
int x=,y=;
while(n--){
cin>>b>>c;
if(b>c)
x++;
if(b<c)
y++;
}
if(x>y){
cout<<"Mishka";
}
if(y>x){
cout<<"Chris";
}
if(x==y){
cout<<"Friendship is magic!^^";
}
return ;
}

说实话这种题贴出来就是为了凑篇幅啊 嘛..用来掩盖我好些天偷懒没更博客的事实【雾!

A. Mishka and Game的更多相关文章

  1. CF #365 (Div. 2) D - Mishka and Interesting sum 离线树状数组

    题目链接:CF #365 (Div. 2) D - Mishka and Interesting sum 题意:给出n个数和m个询问,(1 ≤ n, m ≤ 1 000 000) ,问在每个区间里所有 ...

  2. CF #365 (Div. 2) D - Mishka and Interesting sum 离线树状数组(转)

    转载自:http://www.cnblogs.com/icode-girl/p/5744409.html 题目链接:CF #365 (Div. 2) D - Mishka and Interestin ...

  3. Codeforces Round #365 (Div. 2) Mishka and trip

    Mishka and trip 题意: 有n个城市,第i个城市与第i+1个城市相连,他们边的权值等于i的美丽度*i+1的美丽度,有k个首都城市,一个首都城市与每个城市都相连,求所有边的权值. 题解: ...

  4. Codeforces Round #365 (Div. 2) D. Mishka and Interesting sum 离线+线段树

    题目链接: http://codeforces.com/contest/703/problem/D D. Mishka and Interesting sum time limit per test ...

  5. cf703B Mishka and trip

    B. Mishka and trip time limit per test 1 second memory limit per test 256 megabytes input  standard ...

  6. cf703A Mishka and Game

    A. Mishka and Game time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  7. CodeForces 703A Mishka and Game

    简单题. #pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #inclu ...

  8. Mishka and Interesting sum

    Mishka and Interesting sum time limit per test 3.5 seconds memory limit per test 256 megabytes input ...

  9. CF #365 703D. Mishka and Interesting sum

    题目描述 D. Mishka and Interesting sum的意思就是给出一个数组,以及若干询问,每次询问某个区间[L, R]之间所有出现过偶数次的数字的异或和. 这个东西乍看很像是经典问题, ...

  10. 暑假练习赛 003 F Mishka and trip

    F - Mishka and trip Sample Output   Hint In the first sample test: In Peter's first test, there's on ...

随机推荐

  1. android 查看手机运行的进程列表

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&q ...

  2. 使用datatables实现列宽设置、水平滚动条、显示某列部分内容

    示例 1.//使用 columnDefs 给列设置宽度 $('#example').DataTable( { "columnDefs": [ //给第一列指定宽度为表格整个宽度的2 ...

  3. ffmpeg实时编码解码部分代码

    程序分为编码端和解码端,两端通过tcp  socket通信,编码端一边编码一边将编码后的数据发送给解码端.解码端一边接收数据一边将解码得到的帧显示出来. 代码中的编码端编码的是实时屏幕截图. 代码调用 ...

  4. Regularized least-squares classification(正则化最小二乘法分类器)取代SVM

    在机器学习或者是模式识别其中有一种重要的分类器叫做:SVM .这个被广泛的应用于各个领域.可是其计算的复杂度以及训练的速度是制约其在实时的计算机应用的主要原因.因此也非常非常多的算法被提出来.如SMO ...

  5. java开始到熟悉61

    本此主题:多维数组----矩阵运算 矩阵的运算规则是将对应位置的值进行运算,如上图所示. package array; public class Matrix { /** * 打印矩阵 * @para ...

  6. ORA-07445 第一參数为:kkqljpmpr

      在版本号11.2.0.1.0上,在pl/sql developer中运行一条SQL会导致连接中断,这样的错误要到trace文件夹下找到错误日志文件,再定位.查了一下资料,是这个版本号的bug. D ...

  7. HDU 1040 As Easy As A+B [补]

    今天去老校区找她,不想带电脑了,所以没时间A题了 /*******************************************************************/ As Ea ...

  8. [UnityShader3]溶解与重现效果

    參考链接:http://www.cnblogs.com/Esfog/p/DissolveShader.html 效果图: 从颜色变化来说,有三种,一种是纹理颜色.一种是纹理与黑边的混合颜色,一种是透明 ...

  9. ORACLE 8i 遇到报错:ORA-01631: max # extents (505) reached in table

    近期在客户的一个8i生产库上使用statspack.发现alert中有报错: Mon Jun 16 13:17:52 2014 Errors in file /oracle/8.1.7/admin/p ...

  10. Tomcat配置,Myeclipse破解和各种设置

    转自:http://www.cnblogs.com/tyjsjl/archive/2006/11/14/2156111.html 根据tomcat来配置eclipse和MyEclipse结合使用起来, ...