Min Flips Matrix to Zero

Given an m x n binary matrix, find the minimum number of operations to convert it to all zeros. In one operation, flip a cell and all its adjacent cells (up, down, left, right). Return -1 if impossible.

Examples
Input: [[0,0],[0,1]]
Output: 3
Hints

Min Flips Matrix to Zero

Given an m x n binary matrix, find the minimum number of operations to convert it to all zeros. In one operation, flip a cell and all its adjacent cells (up, down, left, right). Return -1 if impossible.