Hourglass Sum
CodeChefOpen on judge ↗
We define an $hourglass$ in a 2D array $A$ to be a subset of values with indices falling in this pattern in $A$'s graphical representation: a b c d e f g Given a $6$x$6$ 2D Array, $A$ having 16 hourglasses in it and and an hourglass sum is the sum of an hourglass' values. ###Task: Calculate the hourglass sum for every hourglass in $A$, then print the maximum hourglass sum. ###Input: -
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