← All problemsSign in

Largest HourGlass

We define an hourglass in an multidimensional array to be a subset of values with indices falling in this pattern in array's graphical representation: abc d efg In a 6 × 6 2D array, there are 16 hourglasses and an hourglass sum is the sum of an hourglass' values. You have to calculate the hourglass sum for every hourglass in 6X6 array, and then print the maximum hourglass sum. Input First line

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