comefrom: <doocs>0747.Largest Number At Least Twice of Others_1.py
code: def dominantIndex( nums: List[int]) -> int:
      mx = mid = 0
      ans = -1
      for i, v in enumerate(nums):
          if v > mx:
              mid, mx = mx, v
              ans = i
          elif v > mid:
              mid = v
      return ans if mx >= 2 * mid else -1
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_5 = var_3 = 0
      var_7 = - 1
      for var_9 , var_10 in enumerate ( var_0 ) :
          if var_10 > var_5 :
              var_3 , var_5 = var_5 , var_10
              var_7 = var_9
          elif var_10 > var_3 :
              var_3 = var_10
      return var_7 if var_5 >= 2 * var_3 else - 1
  