Problem:


Score : 300 points

Problem Statement

Given is a sequence of integers A_1, A_2, ..., A_N.
If its elements are pairwise distinct, print YES; otherwise, print NO.

Constraints

2 ≤ N ≤ 200000

1 ≤ A_i ≤ 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

If the elements of the sequence are pairwise distinct, print YES; otherwise, print NO.

Sample Input 1

5
2 6 1 4 5

Sample Output 1

YES

The elements are pairwise distinct.

Sample Input 2

6
4 1 3 1 6 2

Sample Output 2

NO

The second and fourth elements are identical.

Sample Input 3

2
10000000 10000000

Sample Output 3

NO



Sample input:
5
2 6 1 4 5


Sample output:
YES

Submission status: Accepted

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
a = intl()
a = list(set(a))
if len(a) == n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

d = dict()
for i in a:
    d[i] = d.get(i, 0) + 1

for n in d.values():
    if n != 1:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

Solution code:
N=int(input())
S=list(map(int,input().split()))
P=set(S)
Q=len(P)
if N==Q:
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
M = set(L)
if len(L) == len(M):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
if len(a) != len(set(a)):
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
N = int(input())
print("YES" if N == len(set(input().split())) else "NO")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
a_new=set(a)
if len(a_new)==n:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
set_a = set(a)
if len(set_a) == len(a):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split())) 
B = set(A)

if len(A) == len(B):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a_list = sorted(list(map(int, input().split())))

for i in range(len(a_list) - 1):
    if a_list[i] == a_list[i+1]:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())
if N == len(list(set(A))):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(str, input().split()))

lis = dict()

for A in As:
  if A in lis:
    print("NO")
    exit()
  else:
    lis[A] = 0
print("YES")

Submission status: Accepted

Solution code:
def has_duplicates(seq):
    return len(seq) != len(set(seq))

n=int(input())
a=list(map(int, input().split()))
flag = has_duplicates(a)
if flag:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
def has_duplicates(seq):
    return len(seq) != len(set(seq))

if has_duplicates(a):
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = [i for i in input().split()]

a.sort()
for i in range(n-1):
    if a[i] == a[i+1]:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
if(len(a) == len(set(a))):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n=int(input())
a_list=list(map(int,input().split()))
a_set=set(a_list)

if len(a_list) == len(a_set):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = list(map(int, input().split()))

if len(a) == len(np.unique(a)):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = set(map(int, input().split()))
print('YES' if n == len(a) else 'NO')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n = int(input())
a = list(map(int, input().split()))
b = list(set(a))
if len(a)==len(b):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
check_dict = {}
flag = 0
for i in range(n):
    if a[i] in check_dict:
        flag = 1
        break
    else:
        check_dict[a[i]] = 1

if flag == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

a = set(A)

if len(A) == len(a):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = set([ int(v) for v in input().split() ])

if len(a) == n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
print('YES' if int(input())==len(set(input().split())) else 'NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input())
A = sorted(list(map(int, input().split())))

ans = True
for i in range(N - 1):
    if A[i] == A[i + 1]:
        ans = False
        break

print('YES' if ans else 'NO')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a = sorted(a)
f = True

for i,j in enumerate(a[:-1]):
    if(a[i] == a[i+1] ):
        f = False
        break
if f:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def solve():
  N = int(input())
  A = list(map(int, input().split()))
  ret = len(set(A)) == N
  print('YES' if ret else 'NO')
  
solve()

Submission status: Accepted

Solution code:
n = int(input())
a = sorted(list(map(int,input().split())))
b = set(a)
if len(b) == n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int , input().split()))
d = {}
for ai in a:
    if ai in d:
        print('NO')
        exit()
    else:
        d[ai] = 1
print('YES')

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))

new=sorted(a)

for i in range(n-1):
    if new[i]==new[i+1]:
        print("NO")
        break
    if i==n-2 and new[i]!=new[i+1]:
        print("YES")

Submission status: Accepted

Solution code:
import collections
n = int(input())
a = list(map(int,input().split()))

c = collections.Counter(a)
if (c.most_common()[0][1]) == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

print('YES' if len(A)==len(set(A)) else 'NO')

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc154/tasks/abc154_c
N = int(input())
A = set(list(map(int, input().split())))
if len(A) == N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
S = int(input())
A = list(map(int,input().split()))
A_uni = list(set(A))
if len(A) == len(A_uni):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#C - Distinct or Not
N = int(input())
A = list(map(int, input().split()))
A_1 = list(set(A))
if len(A) == len(A_1):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
A = list(map(int, input().split()))

cnt = Counter(A)

for i in cnt:
    if cnt[i] > 1:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:

def solve(N, A):
    for i in range(N-1):
        if A[i] == A[i+1]:
            return "NO"
    return "YES"
N = int(input())
A = sorted([int(x) for x in input().split()])
print(solve(N, A))

Submission status: Accepted

Solution code:
N = int(input())
An = [int(n) for n in input().split()]
Nset = len(set(An))
print("YES" if N == Nset else "NO")

Submission status: Accepted

Solution code:
inputf = input

N = inputf()
A = [int(x) for x in inputf().split(' ')]
A_ = set(A)

if len(A) == len(A_):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

if len(A) == len(list(set(A))):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
N=int(input())
A = list(map(int, input().split()))
if len(set(A))==len(A):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
l=list(map(int ,input().split()))
l=set(list(l))
if len(l)==n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import numpy as np

N=int(input())

A=np.array(input().split(" "),dtype=np.int32)

tA=list(set(A))

if(len(A)==len(tA)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
a_list = list(map(int, input().split(" ")))
if len(set(a_list)) < N:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int,input().split()))
if (len(set(A))==len(A)):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
N = int(input())
An = list(map(int,input().split(' ')))
D = {}
for a in An:
    if a in D:
        print('NO')
        exit(0)
    else:
        D[a] = 1
print('YES')

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def has_duplicates(seq):
    return len(seq) != len(set(seq))


N = INT()
A = LIST()

if has_duplicates(A):
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
if len(l) == len(set(l)):
    print ("YES")
else:
    print ("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = set(map(int, input().split()))
if N == len(A):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import queue
import copy
import math
from collections import deque
import bisect

# そのまま入力文字列の入力
n = int(input())

# 空白区切りの数値をリスト化
an = input().split()

s_an = set(an)

if len(an) == len(s_an):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

A.sort()

s = 0
ans = "YES"
for i in A:
    if i > s:
        s = i
    else:
        ans = "NO"
        break
print(ans)

Submission status: Accepted

Solution code:
n = input()
an = list(map(int, input().split()))

newn = set(an)

if len(newn) == len(an):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
if n == len(set(a)):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = int(input())
L=list(map(int,input().split()))
L=sorted(L)

for i in range(N-1):
    if(L[i]==L[i+1]):
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = sorted(list(map(int, input().split())))

flag = True
for i in range(n-1):
    if a[i] == a[i+1]:
        flag = False

if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    A = list(map(int, input().split()))

    sortedA = sorted(A)
    prev = sortedA[0]
    for i in range(1, N):
        if sortedA[i] == prev:
            print('NO')
            break
        
        prev = sortedA[i]
    else:
        print('YES')


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))

from collections import defaultdict
cnt=defaultdict(int)
for i in range(N):
  cnt[A[i]]+=1
  
keys=cnt.keys()
out='YES'
for i in keys:
  if cnt[i]>1:
    out='NO'
    
print(out)

Submission status: Accepted

Solution code:
import math
import numpy as np
from fractions import gcd
import fractions
import statistics
import collections
from functools import reduce
import itertools
from collections import defaultdict
import bisect
from fractions import Fraction
 

N = int(input())
A=list(map(int, input().split()))  

c = collections.Counter(A)

for k,v in c.items():
    if v >=2:
        print('NO')
        exit()

print('YES')

Submission status: Accepted

Solution code:
n = int(input())
A = map(int, input().split())

if n == len(set(A)):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
d = {}
ans = "YES"
for i in a:
  if i in d:
    ans = "NO"
  d[i] = 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
from collections import defaultdict as ddict
ans = ddict(int)
result = True
for a in A:
    ans[a] += 1
    if ans[a] > 1:
        result = False
        break
print("YES") if result else print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = sorted(map(int,input().split()))

for i in range(len(A)-1):
    if A[i]==A[i+1]:
        print('NO')
        exit()

print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
if len(a) == len(set(a)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
from collections import defaultdict
N=int(input())
Alist=input().split()
Adict=defaultdict(int)
for A in Alist:
    Adict[A]+=1
    if Adict[A]==2:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
l = len(a)
s = len(set(a))
if l == s:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N=int(input())
if N == len(set(list(map(int,input().split(' '))))):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N=int(input())
A=len(set(map(int, input().split())))
print("YES" if N==A else "NO")

Submission status: Accepted

Solution code:
from collections import Counter

N = input()
A = map(int,input().split())

C = Counter(A)
for i in C.values():
    if i != 1:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
A = list(map(int, input().split()))

c = Counter(A)

for count in c.values():
    if count != 1:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:
# 2020/02/09
# AtCoder Beginner Contest 154 - C

# Input
n = int(input())
a = list(map(int,input().split()))

a.sort()

# Calc
ans = "YES"
for i in range(1, n):
    if a[i-1] == a[i]:
        ans = "NO"
        break

# Output
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
d=dict()
for i in range(n):
  if a[i] not in d:
    d[a[i]]=0
  else:
    print('NO')
    exit()
print('YES')

Submission status: Accepted

Solution code:
def run():
  N = int(input())
  NA = len(set(map(int, input().split())))
  if N == NA:
    print('YES')
  else:
    print('NO')

if __name__ == '__main__':
    run()

Submission status: Accepted

Solution code:
input = raw_input
n = int(input())
As = set(map(int, input().split(" ")))

nn = len(As)

if nn == n:
    out = "YES"
else:
    out = "NO"
print(out)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

As = sorted(A)

for i in range(N-1):
    if As[i] == As[i+1]:
        break
else:
    print('YES')
    exit()
print('NO')

Submission status: Accepted

Solution code:
a = int(input())
n = list(map(int, input().split()))
p2 = len(n)
p1 = len(list(set(n)))
if(p1 == p2):print("YES")
else:print("NO")

Submission status: Accepted

Solution code:
import collections
n=int(input())
a=list(map(int,input().split()))
if n==len(collections.Counter(a)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
a_dict = Counter(map(int,input().split()))

if a_dict.most_common()[0][1]>1:
    ans = "NO"
else:
    ans = "YES"
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
arr = list(map(int,input().split()))

if len(arr) == len(set(arr)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
d = {}
for i in A:
    d.setdefault(i)
if len(d) == len(A):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
setA=set(A)
if len(setA)==N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n=int(input())
A=list(sorted(map(int,input().split())))
for i in range(n-1):
    if A[i]==A[i+1]:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

Solution code:
def main(n,a):
    a.sort()
    for i in range(1,len(a)):
        if a[i] == a[i-1]:
            return "NO"
    return "YES"

n = int(input())
a = list(map(int,input().split()))
print(main(n,a))

Submission status: Accepted

Solution code:
N = input()
A = input().split(" ")
N = int(N)
set_A = set(A)
if len(set_A) == N:
    print("YES")
else:  
    print("NO")

Submission status: Accepted

Solution code:
import sys
 
N = int(input())
A = list(map(int, input().split()))
 
A.sort()
 
before = 0
for i in range(N):
    if A[i] == before:
        print("NO")
        sys.exit()
    before = A[i]
 
print("YES")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
if len(set(L)) == len(L):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    a = map(int, input().split())
    if len(set(a)) == n:
        print("YES")
    else:
        print("NO")

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(N: int, A: "List[int]"):
    print(YES if len(A)==len(set(A)) else NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
def has_duplicates(seq):
    return len(seq) != len(set(seq))
if has_duplicates(list(map(int,input().split()))):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
import sys
from collections import Counter

N=input()
A=map(int, sys.stdin.readline().split())

C=Counter(A)
if len(C)==N:
    print "YES"
else:
    print "NO"

Submission status: Accepted

Solution code:
import collections
n=int(input())
a=list(map(int, input().split()))

a=collections.Counter(a)
a=list(a.most_common())

if a[0][1]==1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

N = int(input().split()[0])
a_list = list(map(int, input().split()))
ans = "YES" if len(a_list) == len(set(a_list)) else "NO"

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
S = set(A)
if len(A) == len(S):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = tuple(map(int, input().split()))

B = set(A)

if len(A)==len(B):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
my_list = list(map(int, input().split()))

my_set = set()

for item in my_list:
    if item in my_set:
        print('NO')
        exit()
    else:
        my_set.add(item)

print('YES')

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())

if len(set(A)) == N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = int(input())
An = list(map(int, input().split()))

if len(An) == len(set(An)):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = set(map(int,input().split()))
print("YES" if n==len(a) else "NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a = set(a)
if len(a) == n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = set(map(int, input().split()))
l = len(a)
if l == n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())

if len(set(a)) == n:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
N = int(input())
li = len(set(map(int,input().split())))
if N == li:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
A = [int(i) for i in input().split()]
if len(set(A)) == n:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = input()
A = list(map(int, input().split()))
if len(A) == len(set(A)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = [int(a_i) for a_i in input().split()]

if len(a) == len(set(a)):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = set(map(int, input().split()))

if n == len(a):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
l.sort()
flag = True
for i in range(n-1):
    if l[i] == l[i+1]:
        print("NO")
        flag = False
        break
if flag:
    print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))

_a = set(a)

if len(_a) == len(a):
    ans = 'YES'
else:
    ans = 'NO'
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
AS = set(list(input().split()))
print('YES' if len(AS) ==n else 'NO')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

A_dict = dict()
for i in range(N):
    if A[i] in A_dict:
        print("NO")
        exit()
    else:
        A_dict[A[i]] = 1
        
print("YES")

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int, input().split()))

def has_duplicates(seq):
    return len(seq) != len(set(seq))

if has_duplicates(lst)==True:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())

l = input().split()
  
l2 = list(set(l))

if len(l) == len(l2):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
u = set(a)
if len(a) == len(u):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
a = Counter(a)
if a.most_common()[0][1] == 1:print("YES")
else:print("NO")

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))

A.sort()

for i in range(1,N):
    if A[i]==A[i-1]:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

s = set(A)

if N == len(s):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=len(list(set(a)))


print('YES' if n==m else 'NO')

Submission status: Accepted

Solution code:
a = int(input())
l = list(map(int, input().split()))
s = set(l)
if len(l)==len(s):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n=int(input())
a_list = list(map(int, input().split()))
a_list.sort()

for i in range(n-1):
    if a_list[i] == a_list[i+1]:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a_ = set(a)

if len(a) == len(a_):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
A = sorted(A)
flag = 0
for i in range(1, N):
    if A[i - 1] == A[i]:
        flag = 1
        break
if flag == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = sorted(list(map(int, input().split())))
ans = "YES"
now = 0
for i in a:
  if i == now:
    ans = "NO"
    break
  now = i
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = set(a)
a = len(a)
b = len(b)


if a == b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
C = {}
for i in range(N):
    a = A[i]
    if a not in C:
        C[a] = 0
    C[a] += 1
flag = 0
for a in C:
    if C[a]>1:
        flag = 1
        break
if flag==0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.sort()
ans = "YES"
for i in range(n-1):
  if a[i] == a[i+1]:
    ans = "NO"
    break
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

if __name__ == "__main__":
  _n = int(input())
  _l = [int(i) for i in input().split()]

  check = set()
  for i in _l:
    if i in check:
      print("NO")
      exit(0)
    else:
      check.add(i)
  print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

A_set = set(A)

if len(A) == len(A_set):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N=int(input())
alist=list(map(int,input().split()))

alist.sort()
for i in range(1,N):
  if alist[i-1]==alist[i]:
    print("NO")
    break
else:
  print("YES")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
from collections import Counter
s=Counter(a)
if n==len(s):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

n = int(input())
a = [int(i) for i in input().split()]
b = set(a)

def cond():
    return len(a) == len(b)

if cond():
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())
    A = list(map(int, input().split()))

    if len(A) == len(set(A)):
        print('YES')
    else:
        print('NO')


main()

Submission status: Accepted

Solution code:
N = int(input())
A = list( map( int, input().split()))
before = len(A)
after = len(set(A))
if before == after:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

if len(set(A))==len(A):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())

AS =set(A)
if N == len(AS):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys


def main():
    n = int(sys.stdin.readline().strip())
    a = [int(s) for s in sys.stdin.readline().strip().split()]

    seen = set()
    is_yes = True
    for ai in a:
        if ai in seen:
            is_yes = False
            break
        seen.add(ai)
    if is_yes:
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
A=sorted(A)
a=0
for i in range(n-1):
  if A[i]==A[i+1]:
    a=1
if a==0:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
if len(A)==len(set(A)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

B = set(A)
la = len(A)
lb = len(B)
if la == lb:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N=int(input())
List=list(map(int,input().split()))
List.sort()
A = 0

for i in range(len(List)-1):
  a = List[i]
  b = List[i+1]
  
  if a == b:
    A = 1
    
if A == 1:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    a = list(map(int, input().split()))
    set_a = set(a)
    if len(set_a) == len(a):
        print("YES")
    else:
        print("NO")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N,*A = map(int,open(0).read().split())
print("YES" if len(A)==len(set(A)) else "NO")

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(lambda x: int(x), input().split(" ")))
distinct = set(As)

if len(distinct) == len(As):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
arr = list(map(int,input().split()))

arrset = set(arr)

if len(arr) == len(arrset):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a_ls = list(map(int, input().split()))
a_ls.sort()
yes_flg = 1
for i in range(n-1):
    if a_ls[i] == a_ls[i+1]:
        yes_flg = 0
if yes_flg == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
n=len(A)
m=len(set(A))
if n==m:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = set(A)
if len(B) == N:
    print("YES")
else:
    print("NO")