Cube Towers
CodeChefOpen on judge ↗
Besides numbers Alice also likes to play with cubes of letters. She has infinite supply of the cubes with every lowercase Latin letter written on it. So she often builds the towers from her cubes. Specifically, there are N initially empty towers of cubes. Step-by-step, Alice picks a cube and puts it to the top of some of the towers. Sometimes she becomes curious about how many towers contain
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