Elections in Chefland
CodeChefOpen on judge ↗
An election took place in chefland in which there were $n$ elected members and $k$ voters. For a perfect win one member must get more than half of total votes.Unfortunately the poll data was lost. So it was decided to make one of the $n$ elected members as winner for a short period of time till election was conducted once again. Who will be that lucky member now ? A programmer was hired to write
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