Hourglass Sand
CodeChefOpen on judge ↗
Chef has decided to make an hourglass using 2 pyramids. One pyramid stands upright and the second one stands inverted on the top of it to give a hourglass look. A $N$ row hourglass will be constructed in the following way : The middle row is the same for both pyramids containing only one cell numbered " 1 ". The top pyramid will use $( (N-1) / 2)$ rows and the cells will be numbered from $2$ to
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