Sabotage
Chef is participating in a programming competition. Currently, he has a score of $X$. There are $N$ participants other than Chef. The $i$-th of these participants has a score of $A_i$. Chef's *rank* in the contest is determined as follows: - Count the number of indices $i$ ($1 \le i \le N$) such that $A_i \gt X$. Let this count be $R$. - Chef's rank is then equal to $R+1$. Chef would like t
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