CF703A.Mishka and Game
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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!
米什卡是一只小北极熊。众所周知,小熊们喜欢在空闲时间玩掷骰子游戏来赢取巧克力。在一个美妙的晴朗早晨,米什卡在冰块间散步时遇到了她的朋友克里斯,于是他们开始玩起了这个游戏。
游戏规则非常简单:首先确定回合数 n。在每一回合中,双方各掷一枚标准的正方体骰子,其六个面上分别标有互不相同的数字 1 至 6。掷出点数较大的一方赢得该回合;若双方点数相等,则该回合无人获胜。
平均而言,赢得回合数较多的一方即为整局游戏的胜者;若双方赢得的回合数相同,则游戏结果为平局。
米什卡还很小,尚不能统计胜负次数,因此她请你来观战并判定游戏结果。请帮帮她!
输入格式
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 m__i and c__i (1 ≤ m__i, c__i ≤ 6) — values on dice upper face after Mishka's and Chris' throws in i-th round respectively.
输入的第一行包含一个整数 n(1≤n≤100)—— 表示游戏轮数。
接下来的 n 行描述各轮的情况。其中第 i 行包含两个整数 mi 和 ci(1≤mi,ci≤6)—— 分别表示第 i 轮中 Mishka 和 Chris 扔骰子后朝上的点数。
输出格式
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.
如果 Mishka 是游戏的获胜者,则在唯一一行中输出 "Mishka"(不带引号)。
如果 Chris 是游戏的获胜者,则在唯一一行中输出 "Chris"(不带引号)。
如果游戏结果为平局,则在唯一一行中输出 "Friendship is magic!^^"(不带引号)。
输入输出样例
输入#1
3 3 5 2 1 4 2
输出#1
Mishka
输入#2
2 6 1 1 6
输出#2
Friendship is magic!^^
输入#3
3 1 5 3 3 2 2
输出#3
Chris
说明/提示
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.
在第一个样例中,Mishka 输掉了第一轮,但赢下了第二轮和第三轮,因此她是整场比赛的获胜者。
在第二个样例中,Mishka 赢下了第一轮,Chris 赢下了第二轮,比赛以 1:1 的比分平局结束。
在第三个样例中,Chris 赢下了第一轮,但接下来的两轮均无胜者。整场比赛的获胜者是 Chris。
输入解题思路,AI测评打分。不知道怎么写?