Who is better at CP
CodeChefOpen on judge ↗
Manish and Harish, the heads of Coding and Logic are having a battle to find out who is the better competitive programmer. At this point, they have the exact same rating on all platforms. So they asked Parth, one of their coordinators to set a problem and both of them would do a lockout. Parth came up with the following problem, given an array $A$ of length $n$, with the elements of $A$ all being
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