Greedy algorithm proof strategies

Revision en1, by _Bishop_, 2021-05-23 20:14:52

I was solving this problem E2.Voting(Hard Version) from Educational Round 75. I found the key idea of the problem somewhat hard to grasp. Also, the editorial doesn't contain the proof of the idea. Although the approach itself is clear but why it should work seems a little hard to think of. So, please solve the problem and share your ideas/proofs about it. How did you come up with the idea or some key observations that led you to solve the problem (need not be rigorous)? Also, this problem allows multiple approaches (looking at neal's submissions).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _Bishop_ 2021-05-23 20:14:52 737 Initial revision (published)