Suki's Sunniest Nap Spot
Every afternoon Suki, a curly black dog with a grey beard and white paws, drags her favourite blanket
onto the patio for a nap. The patio is a grid of R rows and C columns of square tiles, and the
sun has warmed each tile by a different amount: the tile in row i and column j has warmth
w_{i,j}. Rows are numbered 1 to R from top to bottom and columns 1 to C from left to right.
The blanket always covers exactly a k × k square of whole tiles, lying fully on the patio. The
warmth of a spot is the sum of the warmths of the k·k tiles under the blanket. Suki wants the
warmest spot. If several spots are equally warm, she picks the one whose top-left tile is in the
smallest row, and among those the one whose top-left tile is in the smallest column.
Input
The first line contains three integers R, C and k (1 ≤ R, C ≤ 50, 1 ≤ k ≤ min(R, C)).
Each of the next R lines contains C integers: the i-th of these lines holds
w_{i,1}, w_{i,2}, ..., w_{i,C} (0 ≤ w_{i,j} ≤ 100).
Output
Print three integers: the row and the column of the top-left tile of the chosen spot, and its total warmth.
Notes
In the first example the 2 × 2 square with top-left tile (2, 2) covers warmths 9, 8, 7 and 9, for a total of 33, more than any other spot.
In the second example two spots both have warmth 6: the one starting at (1, 3) and the one starting at (2, 1). The first one is higher up, so Suki chooses it even though the other is further left.