← All problemsSign in

CR Elections

Your class CR is going to be elected by voting but the rules are as follows. There are $n$ students and the value of the vote of each student is not equal. He wins the election if his score is more than opponent’s score. Given an array A of length $n$ denoting the value of the vote of each student. There are $n-k+1$ contestants. Each of the contestant can get only $k$ votes. The $i$th contestant c

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start