#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
using namespace std;
int main() {
int n;
scanf("%d", &n);
int big = 0;
int small = 0;
int equ = 0;
for (int i = 1;i <= n;++i) {
int a, b;
scanf("%d %d", &a, &b);
if (a > b) {
big++;
}
else if (a == b) {
equ++;
}
else {
small++;
}
}
if (big > small) {
printf("Mishka\n");
}
else if (big == small) {
printf("Friendship is magic!^^\n");
}
else {
printf("Chris\n");
}
//system("pause");
return 0;
}
本文展示了一个使用C++编写的程序,该程序用于输入多个回合的竞赛结果,并比较两个参与者Mishka和Chris的胜利次数。根据输入的每轮比赛结果,程序将输出最终胜利者或宣布平局。

142

被折叠的 条评论
为什么被折叠?



