And The Winner Is

During junior chess tournaments, a player may be paired in matches with another player of a different age. However, at the end of the tournament, players with the best score for each age (where age is calculated on the day of the tournament) are recognized separately. In the case of a tie, all players attaining the highest score are recognized.

For the sake of clarity, a birthday is defined as the day that a person turns a year older. For example, a person born on the 2nd June 1996 is five (5) years old on the 1st June 2002, is six (6) years old on the 2nd June 2002 and will be considered in the age category of six (6) in a tournament held on the 2nd June 2002. Note that a person born on the 29th February becomes a year older on the 29th February in leap years and on the 1st March in non-leap years.

Your task is to write a program to identify the winners, and co-winners, amongst those participating in a junior chess tournament.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License