comefrom: <doocs>2155.All Divisions With the Highest Score of a Binary Array_1.py
code: def maxScoreIndices( nums: List[int]) -> List[int]:
      left, right = 0, sum(nums)
      mx = right
      ans = [0]
      for i, num in enumerate(nums):
          if num == 0:
              left += 1
          else:
              right -= 1
          t = left + right
          if mx == t:
              ans.append(i + 1)
          elif mx < t:
              mx = t
              ans = [i + 1]
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
      var_4 , var_6 = 0 , sum ( var_0 )
      var_7 = var_6
      var_8 = [ 0 ]
      for var_10 , var_11 in enumerate ( var_0 ) :
          if var_11 == 0 :
              var_4 += 1
          else :
              var_6 -= 1
          var_13 = var_4 + var_6
          if var_7 == var_13 :
              var_8.append ( var_10 + 1 )
          elif var_7 < var_13 :
              var_7 = var_13
              var_8 = [ var_10 + 1 ]
      return var_8
  