Types: N: int, M: int, a: List[List[int]]
Ranges: 1 ≤ N, M ≤ 300, 0 ≤ a[i][j] ≤ 1 (1 ≤ i ≤ N, 1 ≤ j ≤ M)
Addtl Info: None