0533. Lonely Pixel II
Last updated
Last updated
**Input:** picture = [["W","B","W","B","B","W"],["W","B","W","B","B","W"],["W","B","W","B","B","W"],["W","W","B","W","B","W"]], target = 3
**Output:** 6
**Explanation:** All the green 'B' are the black pixels we need (all 'B's at column 1 and 3).
Take 'B' at row r = 0 and column c = 1 as an example:
- Rule 1, row r = 0 and column c = 1 both have exactly target = 3 black pixels.
- Rule 2, the rows have black pixel at column c = 1 are row 0, row 1 and row 2. They are exactly the same as row r = 0.**Input:** picture = [["W","W","B"],["W","W","B"],["W","W","B"]], target = 1
**Output:** 0