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 ;
}

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

最新文章

  1. easyui datagrid 悬浮事件
  2. window8.1使用之快捷键
  3. lc.exe已退出代码为1
  4. HTML中的边框属性
  5. JavaWeb学习记录(五)——Servlet随机产生验证码
  6. 计算机术语install和setup的区别
  7. 工欲善其事必先利其器---SQL在线可视化模型设计,(还可学习拖拽知识)
  8. The request failed with HTTP status 401: Unauthorized.
  9. Js插件开发
  10. Linux企业运维人员最常用150个命令汇总
  11. 命令行利用KVM创建虚拟机
  12. MMORPG中的相机跟随算法
  13. Beta冲刺(2/7)
  14. java中不定参数的使用
  15. SSL&TLS渗透测试
  16. Python开发——解释器安装
  17. ASP/SQL 注入天书
  18. 怎么打印 sql 语句
  19. 国密算法--Openssl 实现国密算法(基础介绍和产生秘钥对)
  20. 关于NHibernate中存在于Session中实例的3种状态的简单分析

热门文章

  1. Android Studio 2.0 Beta 5公布,修复几个与即时执行相关的严重BUG.
  2. EF Core使用SQL调用返回其他类型的查询 ASP.NET Core 2.0 使用NLog实现日志记录 CSS 3D transforms cSharp:use Activator.CreateInstance with an Interface? SqlHelper DBHelper C# Thread.Abort方法真的让线程停止了吗? 注意!你的Thread.Abort方法真
  3. HDU 1028 Ignatius and the Princess III (母函数或者dp,找规律,)
  4. Linux下mount FreeBSD分区
  5. Js两种post方式(转)
  6. Page Design for Sexable Forum
  7. 【转载】FAT12文件系统之引导扇区结构
  8. mysql的DUPLICATE KEY
  9. java使用默认线程池踩过的坑(三)
  10. poj 1821 Fence(单调队列优化DP)