Count how many teams of 3 students can be formed such that the total skill level is even.
You are given the skill levels of students. Count the number of different teams of exactly 3 students whose combined skill is even.
A team is identified only by the chosen 3 students, so the order does not matter.
The task is to determine how many such teams can be formed.
Print a single integer — the number of 3-person teams with even total skill.
Example 1
Input
5 1 2 3 4 5
Output
3
Explanation
The valid teams are {1,2,3}, {1,4,5}, and {2,3,5}. Each has an even sum.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.