Implemented logic to calculate first place rankings