scores with the scores of some participants. Split all participants into two non-empty groups (each person goes to exactly one) so that both groups have the same average score. The average of a group is the sum of its scores divided by its size.
Return True if such a split exists and False otherwise.scores=[3, 9, 4, 8] → True
The groups [3, 9] and [4, 8] both average 6.
scores=[1, 2, 6] → False
The overall average is 3, so each group would have to average 3 as well. No single number equals 3 and no pair sums to 6.
scores=[5, 1, 9, 5] → True
[5] and [1, 9, 5] both average 5. The groups may differ in size.
scores=[3, 9, 4, 8]
True
Run checks the first 3 tests in your browser. Submit checks all 98 tests on the server, hidden ones included.