Anders Kaseorg's submission of Maximum Remaining | CodeChef