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).
You can check my comment under the editorial