Created
August 14, 2017 01:35
-
-
Save mcharo/5658c88bcde01bc63e818f2c4d267160 to your computer and use it in GitHub Desktop.
Triplet compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vector < int > solve(int a0, int a1, int a2, int b0, int b1, int b2){ | |
std::vector<int> score(2, 0); | |
int clarity = a0 - b0; | |
int originality = a1 - b1; | |
int difficulty = a2 - b2; | |
if (clarity > 0) { | |
score[0]++; | |
} | |
else if (clarity < 0) { | |
score[1]++; | |
} | |
if (originality > 0) { | |
score[0]++; | |
} | |
else if (originality < 0) { | |
score[1]++; | |
} | |
if (difficulty > 0) { | |
score[0]++; | |
} | |
else if (difficulty < 0) { | |
score[1]++; | |
} | |
return score; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment