Skip to content

Commit 20a27b3

Browse files
committed
Added 703A - Mishka and Game.cpp
1 parent 6511367 commit 20a27b3

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

703A - Mishka and Game.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
// Code Written By: Vikash Patel
5+
6+
int main()
7+
{
8+
int n;
9+
cin>>n;
10+
int points[n][2];
11+
int M=0, C=0;
12+
for(int i=0;i<n;i++)
13+
{
14+
cin>>points[i][0]>>points[i][1];
15+
}
16+
17+
18+
for(int i=0;i<n;i++)
19+
{
20+
if(points[i][0]>points[i][1])
21+
{
22+
M++;
23+
}
24+
25+
if(points[i][0]<points[i][1])
26+
{
27+
C++;
28+
}
29+
}
30+
31+
if(M>C)
32+
cout<<"Mishka"<<endl;
33+
else if(C>M)
34+
cout<<"Chris"<<endl;
35+
else
36+
cout<<"Friendship is magic!^^"<<endl;
37+
}

0 commit comments

Comments
 (0)