comefrom: <qiyuangong>063_Unique_Paths_II_2.py
code: def uniquePathsWithObstacles( obstacleGrid):
      m, n = len(obstacleGrid), len(obstacleGrid[0])
      if m == 0:
          return 0
      dmap = [[0] * (n + 1) for _ in range(m + 1)]
      dmap[m - 1][n] = 1
      for i in range(m - 1, -1, -1):
          for j in  range(n - 1, -1, -1):
              if obstacleGrid[i][j] == 1:
                  dmap[i][j] = 0
              else:
                  dmap[i][j] = dmap[i][j + 1] + dmap[i + 1][j]
      return dmap[0][0]
masked: def sample_funcname ( var_0 ) :
      var_2 , var_4 = len ( var_0 ) , len ( var_0 [ 0 ] )
      if var_2 == 0 :
          return 0
      var_8 = [ [ 0 ] * ( var_4 + 1 ) for var_6 in range ( var_2 + 1 ) ]
      var_8 [ var_2 - 1 ] [ var_4 ] = 1
      for var_9 in range ( var_2 - 1 , - 1 , - 1 ) :
          for var_10 in range ( var_4 - 1 , - 1 , - 1 ) :
              if var_0 [ var_9 ] [ var_10 ] == 1 :
                  var_8 [ var_9 ] [ var_10 ] = 0
              else :
                  var_8 [ var_9 ] [ var_10 ] = var_8 [ var_9 ] [ var_10 + 1 ] + var_8 [ var_9 + 1 ] [ var_10 ]
      return var_8 [ 0 ] [ 0 ]
  