COUNT
CodeChefOpen on judge ↗
The Chef had a box with N numbers arranged inside it: A1, A2, ..., AN. Initially, these numbers are arranged in an order. But in his excitement due the ongoing event he started dancing with the box in his pocket, and the numbers got jumbled up. So now, he no longer knows which of the numbers is the largest and how many times he had that number. He wants to find the largest of the N numbers and its
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