Editorial for Arcadia Computing Contest 1 P5 - Hacking Grades


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: wleung_bvg

Use a priority queue of fractions storing largest marginal gains when incrementing the numerator and denominator of that fraction. Remember to re-insert the new marginal gain after selecting the largest.


Comments

There are no comments at the moment.