Editorial for OTHS Coding Competition 1 (Mock CCC) J2 - Wand Selection
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.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
For this problem, iterate through the wands keeping a running sum and a running maximum. At the end of iterating, calculate the average, subtracting the running maximum.
Time Complexity:
Comments