You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here: https://youtu.be/aI9vQg2gO0Q
#include <bits/stdc++.h> using namespace std; int main() { int a1, a2, a3, alicePoint = 0, b1, b2, b3, bobPoint = 0; cin >> a1 >> a2 >> a3; cin >> b1 >> b2 >> b3; alicePoint = ((a1 > b1? 1:0)) + ((a2 > b2? 1:0)) + ((a3 > b3? 1:0)); bobPoint = ((a1 < b1? 1:0)) + ((a2 < b2? 1:0)) + ((a3 < b3? 1:0)); cout << alicePoint << " " << bobPoint ; return 0; }
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 →
Here is my c++ solution, you can watch the explanation here: https://youtu.be/aI9vQg2gO0Q