题目链接:http://codeforces.com/problemset/problem/703/A
题意:
Mishka 在和 Chirs 玩骰子,已知她们两玩的总局数,以及每局两人的得分情况,问最后是谁赢.
水题,就不多说了......
代码:
1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int main() { 5 int n; 6 scanf("%d", &n); 7 int Mish = 0, Chri = 0; 8 for(int i = 0; i < n; i++) { 9 int a, b; 10 scanf("%d%d", &a, &b); 11 if(a > b) Mish++; 12 if(a < b) Chri++; 13 } 14 if(Mish > Chri) printf("Mishka "); 15 else if(Mish < Chri) printf("Chris "); 16 else printf("Friendship is magic!^^ "); 17 return 0; 18 }