Maximum length of same class
CodeChefOpen on judge ↗
Rahul is a Bachelor of Technology (BTech) student from Indore Institute of Science and Technology. One day he go to his college canteen and he saw a huge line. He found it very boring to stand in queue. So he decided to stand on that range of the queue where he saw longest consecutive length in queue of his year students, So that he can enjoy with his batchmates. The $i_{th}$ student of queue is
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