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_3 = { }
      var_6 = 10 ** 6
      for var_8 , var_9 in enumerate ( var_0 ) :
          if var_9 in var_3 :
              var_6 = min ( var_6 , var_8 - var_3 [ var_9 ] + 1 )
          var_3 [ var_9 ] = var_8
      return - 1 if var_6 == 10 ** 6 else var_6
  