comefrom: <doocs>0531.Lonely Pixel I_1.py
code: def findLonelyPixel( picture: List[List[str]]) -> int:
      m, n = len(picture), len(picture[0])
      rows, cols = [0] * m, [0] * n
      for i in range(m):
          for j in range(n):
              if picture[i][j] == 'B':
                  rows[i] += 1
                  cols[j] += 1
      res = 0
      for i in range(m):
          if rows[i] == 1:
              for j in range(n):
                  if picture[i][j] == 'B' and cols[j] == 1:
                      res += 1
                      break
      return res
masked: def sample_funcname ( var_0 : List [ List [ str ] ] ) -> int :
      var_5 , var_7 = len ( var_0 ) , len ( var_0 [ 0 ] )
      var_8 , var_9 = [ 0 ] * var_5 , [ 0 ] * var_7
      for var_11 in range ( var_5 ) :
          for var_12 in range ( var_7 ) :
              if var_0 [ var_11 ] [ var_12 ] == 'B' :
                  var_8 [ var_11 ] += 1
                  var_9 [ var_12 ] += 1
      var_15 = 0
      for var_11 in range ( var_5 ) :
          if var_8 [ var_11 ] == 1 :
              for var_12 in range ( var_7 ) :
                  if var_0 [ var_11 ] [ var_12 ] == 'B' and var_9 [ var_12 ] == 1 :
                      var_15 += 1
                      break
      return var_15
  