<p>Given a <code>m x n</code> matrix <code>mat</code> and an integer <code>k</code>, return <em>a matrix</em><code>answer</code><em>where each</em><code>answer[i][j]</code><em>is the sum of all elements</em><code>mat[r][c]</code><em>for</em>:</p>
<ul>
<li><code>i - k <= r <= i + k,</code></li>
<li><code>j - k <= c <= j + k</code>, and</li>
<li><code>(r, c)</code> is a valid position in the matrix.</li>