Given an `m x n` binary matrix `mat`, return a matrix of the same size where each cell holds the distance to the **nearest** `0`. The distance between two adjacent cells is `1` (4-directional).
Example 1
Input:mat = [[0,0,0],[0,1,0],[1,1,1]]
Output:[[0,0,0],[0,1,0],[1,2,1]]
Explanation:Each 1 is labeled with its distance to the closest 0.
Constraints
- m == mat.length
- n == mat[i].length
- 1 <= m, n <= 10^4, with m * n <= 10^4
- There is at least one 0