Editorial for LCC '24 Contest 1 S4 - Splitting Candy
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:
Notice that this problem can be solved using prefix sum arrays.
The brands denotated with a
The index of the last element with the value
Comments