Count Maximum Teams

Amazon is hosting a team hackathon.

Determine the maximum number of teams that can be formed from the contestants.


This is a companion discussion topic for the original entry at https://algo.monster/problems/amazon_oa_count_maximum_teams/