Jimma and Chingam
CodeChefOpen on judge ↗
Jimma the cat had placed N bowls of cat food in a line. The amount of food in each bowl is an integer and is given to you as the array A[1], A[2], ... , A[N], where A[1] is the amount of food in the leftmost bowl, and A[N] is the amount in the rightmost bowl. But Chingam the kitten doesn't like unsorted sequences. In general, for an arbitrary sequence B[1], B[2], ... , B[N], Chingam's unhappin
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