Mirzapur Election
CodeChefOpen on judge ↗
Jas and Ashish are the President and Vice-president of CSIT Party and are working hard to win the elections of Mirzapur. There are **N** states in Mirzapur, whose vote counts on Day 0 are given. (*count[0,....,n-1]*) . Next **D** days, either the vote count of a state gets updated, or the election commission wants Jas and Ashish to submit their Max-Potential Value. **Max-Potential** = ma
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start