comefrom: <doocs>1582.Special Positions in a Binary Matrix_1.py
code: def numSpecial( mat: List[List[int]]) -> int:
      m, n = len(mat), len(mat[0])
      r = [0] * m
      c = [0] * n
      for i, row in enumerate(mat):
          for j, v in enumerate(row):
              r[i] += v
              c[j] += v
      ans = 0
      for i in range(m):
          for j in range(n):
              if mat[i][j] == 1 and r[i] == 1 and c[j] == 1:
                  ans += 1
      return ans
masked: def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
      var_1 , var_2 = len ( var_0 ) , len ( var_0 [ 0 ] )
      var_3 = [ 0 ] * var_1
      var_4 = [ 0 ] * var_2
      for var_5 , var_6 in enumerate ( var_0 ) :
          for var_7 , var_8 in enumerate ( var_6 ) :
              var_3 [ var_5 ] += var_8
              var_4 [ var_7 ] += var_8
      var_9 = 0
      for var_5 in range ( var_1 ) :
          for var_7 in range ( var_2 ) :
              if var_0 [ var_5 ] [ var_7 ] == 1 and var_3 [ var_5 ] == 1 and var_4 [ var_7 ] == 1 :
                  var_9 += 1
      return var_9
  