← All problemsSign in

K stacks and Plates

Chingam likes to collect plates because they remind him of food. But Jimma hates plates, because they make a lot of noise when they break. Chingam has a collection of N plates hidden behind Jimma's bed, so that she cannot find them. The plates are arranged in K stacks, such that each stack has at least one plate. The stacks are indexed from 0 to K-1. Where 0 is index of the leftmost stack and K-1

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start