comefrom: <doocs>2260.Minimum Consecutive Cards to Pick Up_1.py
code: def minimumCardPickup( cards: List[int]) -> int:
      m = {}
      ans = 10**6
      for i, c in enumerate(cards):
          if c in m:
              ans = min(ans, i - m[c] + 1)
          m[c] = i
      return -1 if ans == 10**6 else ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_1 = { }
      var_2 = 10 ** 6
      for var_3 , var_4 in enumerate ( var_0 ) :
          if var_4 in var_1 :
              var_2 = min ( var_2 , var_3 - var_1 [ var_4 ] + 1 )
          var_1 [ var_4 ] = var_3
      return - 1 if var_2 == 10 ** 6 else var_2
  