Given a 2D Array, :
1 1 1 0 0 0
0 1 0 0 0 0
1 1 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
An hourglass in arr is a subset of values with indices falling in this pattern in arr's graphical representation:
a b c
d
e f g
There are 16 hourglasses in arr. An hourglass sum is the sum of an hourglass' values. Calculate the hourglass sum for every hourglass in arr, then print the maximum hourglass sum. The array will always be 6 X 6.
Input Format
Each of the lines of inputs contains space-separated integers.
Constraints
Output Format
Print the largest (maximum) hourglass sum found in arr.
arr contains the following hourglasses:
The hourglass with the maximum sum (19) is:
2 4 4
2
1 2 4