Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #71 from shubhangNarain/snv
Browse files Browse the repository at this point in the history
Solved #66 in C++
  • Loading branch information
ndrohith09 authored Oct 20, 2022
2 parents 2720a35 + eb6098a commit 9e3bb19
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions c++/Compare-The-Triplets.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<bits/stdc++.h>
using namespace std;

int main(){
int a[3],b[3];
for(int i=0;i<3;i++) cin>>a[i];
for(int i=0;i<3;i++) cin>>b[i];
int alice=0,bob=0;
for(int i=0;i<3;i++){
if(a[i]==b[i]) continue;

if(a[i]>b[i]) alice++;
else bob++;
}

cout<<alice<<" "<<bob<<endl;
}

0 comments on commit 9e3bb19

Please sign in to comment.