You are viewing a single comment's thread. Return to all comments →
This is the solution in Cpp
vector compareTriplets(vector a, vector b) { int alice=0; int bob=0;
for(int i=0;i<3;i++){ if(a[i]>b[i]){ alice+=1; } else if(a[i]<b[i]){ bob+=1; } } return {alice, bob};
}
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
This is the solution in Cpp
vector compareTriplets(vector a, vector b) { int alice=0; int bob=0;
}