Given two integers m and n representing the dimensions of an m $ imes$ n matrix initialized with all indices where each element indices[i] = [r_i, c_i].
For each pair [r_i, c_i], apply the following operations:
Increment all elements in row r_i by
Increment all elements in column c_i by
Return the number of cells in the matrix with odd values after processing all pairs in indices.
Constraints:
m, n
indices.length
r_i m
c_i n
Given two integers m and n representing the dimensions of an m $ imes$ n matrix initialized with all indices where each element indices[i] = [r_i, c_i].
For each pair [r_i, c_i], apply the following operations:
Increment all elements in row r_i by
Increment all elements in column c_i by
Return the number of cells in the matrix with odd values after processing all pairs in indices.
Constraints:
m, n
indices.length
r_i m
c_i n