CodeForces 703A Mishka and Game
简单题。
#pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<vector> #include<map> #include<set> #include<queue> #include<stack> #include<iostream> using namespace std; typedef long long LL; const double pi=acos(-1.0),eps=1e-8; void File() { freopen("D:\\in.txt","r",stdin); freopen("D:\\out.txt","w",stdout); } int n,sum1,sum2; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { int a,b; scanf("%d%d",&a,&b); if(a>b) sum1++; else if(a<b) sum2++; } if(sum1>sum2) printf("Mishka\n"); else if(sum1<sum2) printf("Chris\n"); else printf("Friendship is magic!^^\n"); return 0; }