Codeforces 703A Mishka and Game

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/polanwind/article/details/84197456
#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;
}

猜你喜欢

转载自blog.csdn.net/polanwind/article/details/84197456