https://leetcode.com/problems/set-matrix-zeroes/
class Solution {
public:
void setZeroes(vector<vector<int>>& matrix) {
int row=matrix.size();
if(row==0) return;
int col=matrix[0].size();
vector<bool>rowRecorder(row, false);
vector<bool>colRecorder(col, false);
for(int i=0;i<row;i++){
for(int j=0;j<col;j++){
if(matrix[i][j]==0){
rowRecorder[i]=true;
colRecorder[j]=true;
}
}
}
for(int i=0;i<row;i++){
for(int j=0; j<col;j++){
if(rowRecorder[i]) matrix[i][j]=0;
if(colRecorder[j]) matrix[i][j]=0;
}
}
}
};