Tallest Tower
CodeChefOpen on judge ↗
You are a kid playing with rectangle blocks with sides of length $x$ and $y$ and height of 1 unit. Your friend gives you n blocks one by one. You can either accept the block or reject it. You want to stack the blocks such that the blocks form a tall tower. While stacking the blocks you make sure to only accept the block if and only if the block is smaller than the block on top right now. A block i
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