C++ Are Equally Strong
#include <algorithm>
bool areEquallyStrong(int yourLeft, int yourRight, int friendsLeft, int friendsRight)
{
return std::max(yourRight, yourLeft) == std::max(friendsLeft, friendsRight)
&& std::min(yourLeft, yourRight) == std::min(friendsRight, friendsLeft);
}
This compares each person’s strongest and weakest arm. If both pairs match, the result is true.