[text] fgh

Viewer

  1. a = list(map(int, input().split()))
  2. q = set()
  3. k = 0
  4. for i in range(1, len(a)+1):
  5.     q.add(a[i-1])
  6.     if len(q) == len(a[:i]) - k:
  7.         print('NO')
  8.     else:
  9.         k += 1
  10.         print('YES')
  11.  

Editor

You can edit this paste and save as new:


File Description
  • fgh
  • Paste Code
  • 26 Sep-2021
  • 208 Bytes
You can Share it: