Editorial for LCC '24 Contest 2 S1 - Betting Odds


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: nelimalu

Notice that the number of people in front of a contestant is equal to the index of that contestant in the given array.

This means that given a contestant number, you must print its index in the array.

Searching sequentially may be too slow, so you might want to try a different approach like binary search .


Comments

There are no comments at the moment.