Advertisement
rahat62

A. Mishka and Game

Sep 11th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int t,t1,t2,m=0,c=0;
  7.  
  8.     cin>>t;
  9.  
  10.     while(t--)
  11.     {
  12.         cin>>t1>>t2;
  13.  
  14.         if(t1>t2) m++;
  15.         if(t2>t1) c++;
  16.  
  17.  
  18.     }
  19.  
  20.     if(m>c)
  21.     {
  22.         cout<<"Mishka"<<endl;
  23.     }
  24.     if(m==c)
  25.     {
  26.         cout<<"Friendship is magic!^^"<<endl;
  27.     }
  28.     if(m<c)
  29.     {
  30.         cout<<"Chris"<<endl;
  31.     }
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement