From 53d27feae886c0de928c329fc08ae97c03d3e185 Mon Sep 17 00:00:00 2001 From: sakshi kumari <56168294+sakshi-06@users.noreply.github.com> Date: Thu, 1 Oct 2020 10:35:04 +0530 Subject: [PATCH] Create 703 A.Mishka and game.cpp added solution to 703A --- 703 A.Mishka and game.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 703 A.Mishka and game.cpp diff --git a/703 A.Mishka and game.cpp b/703 A.Mishka and game.cpp new file mode 100644 index 0000000..2fcd585 --- /dev/null +++ b/703 A.Mishka and game.cpp @@ -0,0 +1,19 @@ +#include + +using namespace std; + +int main() +{ + int n,a[3]={0}; + cin>>n; + while(n--) + { + int x,y; + cin>>x>>y; + if(x>y) a[1]++; + else if(y>x) a[2]++; + } + if(a[1]>a[2]) cout<<"Mishka"; + else if(a[2]>a[1]) cout<<"Chris"; + else cout<<"Friendship is magic!^^"; +} \ No newline at end of file