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:
n = int(input())
a = list(map(int , input().split()))
 
import collections
dic = collections.Counter(a)
 
if max(dic.values()) == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

set_a = set(a)

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

Submission status: Accepted

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

N = int(input().strip())
A_list = list(map(int, input().rstrip().split()))
#-----

A_set = set()

for a in A_list:
    if a in A_set:
        print("NO")
        break
    
    A_set.add(a)
    
else:
    print("YES")

Submission status: Accepted

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

sa = set(a)
if len(sa) == n:
    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:
#!/usr/bin/env python3
n = int(input())
x = list(map(int, input().split()))
nx = sorted(x)
y = False

for i in range(n):
    if nx[i] == nx[i-1]:
        y = True
        break
    else:
        continue

print("YES") if y == False else print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
set_a = set(a)
if len(set_a) == n:
    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(N-1):
  if A[i] == A[i+1]:
    print('NO')
    exit()
  else:
    pass
print('YES')

Submission status: Accepted

Solution code:
import sys

n = int(input())
As = list(map(int, input().split()))
sort_as = sorted(As)
for i in range(len(sort_as)):
    if i == len(sort_as)-1:
        pass
    else:
        if sort_as[i+1] == sort_as[i]:
            print("NO")
            sys.exit()
        else:
            continue

print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC 143

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

Submission status: Accepted

Solution code:
import numpy as np
from collections import defaultdict

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

d = defaultdict(int)

for i in range(n):
    d[a[i]] += 1

print("YES") if max(d.values()) == 1 else print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]

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

Submission status: Accepted

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

aa = set(a)

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

Submission status: Accepted

Solution code:
import sys
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')
    sys.exit()
print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

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

n_map = {}
ok = True
for a in A:
    if str(a) in n_map:
        ok = False
    n_map[str(a)] = True
if ok:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
seta = set(a)
if len(a)==len(seta):
  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())
set_1 = set()
list_1 = list(map(int, input().split(' ')))

for item in list_1:
  set_1.add(item)

if len(list_1) == len(set_1):
  print("YES", end="")
else:
  print("NO", end="")

Submission status: Accepted

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

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 = list(map(int, input().split()))

lenA = len(A)
lenB = len(set(A))

if lenA != lenB:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

s = set()
ok = True
for a in A:
    if a in s:
        ok = False
        break
    else:
        s.add(a)

if ok:
    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 = 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()))

cond = len(set(a)) == len(a)

if cond:
    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(N-1):
    if A[i+1]-A[i]==0:
        print("NO")
        exit(0)
print("YES")

Submission status: Accepted

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

print(solve())

Submission status: Accepted

Solution code:
n = int(input())
a = {int(i) for i in input().split()}
if n == len(a) :
    print("YES")
else :
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 'YES'
old = A[0]
for i in range(1,N):
    x = A[i]
    if x == old:
        ans = 'NO'
        break
    old = x

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,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 = [int(x) for x in input().split()]
A.sort()
p = 0
for i in range(N-1):
    if A[i] == A[i+1]:
        p = 1
        break
if p == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################
n = int(input())
li = input().split()
l = list(set(li))
#print(li)
#print(l)
if len(l)==len(li):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
d={}
flag=0

for i in range(n):
  if l[i] in d:
    flag=1
    break
  else:
    d[l[i]]=1
    
if flag==0:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()

a=list(map(int, input().split())) #スペース区切りの数字をlistで取得

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

Submission status: Accepted

Solution code:
from collections import defaultdict

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

d = defaultdict(int)
for a in A:
    d[a] += 1

if len(d) == N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
a = list(map(int, input().split()))
b = []
flag = []

b = sorted(a)

for i in range(0,N-1):
  if (b[i+1]-b[i]) == 0:
    flag.append(0)
  else:
    flag.append(1)

if np.prod(flag) == 0:
  print ("NO")
else:
  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=input();a=list(map(int,input().split()))
print(["YES","NO"][len(set(a))!=len(a)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
num = list(map(int, input().split()))
lenbef = len(num)
numset = set(num)
lenaft = len(numset)

if lenbef == lenaft:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = [int(k) for k in input().split()]

result = True

# for char in A:
#     if(A.count(char) != 1):
#         result = False
#         break
# for i in range(N):
#     for j in range(i+1, N):
#         # print("A[i]= "+str(A[i])+", A[j]= "+str(A[j]))
#         if A[i] == A[j]:
#             result = False
A.sort()

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

if (result == True):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

A.sort()

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

Submission status: Accepted

Solution code:
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:
def main():
    N = int(input())  # 文字列または整数(一変数)
    A = list(map(int, input().split()))  # 整数のリスト

    d = {}

    for i in A:
        if not i in d.keys():
            d[i] = None
        else:
            print("NO")
            return
    else:
        print("YES")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, *a = map(int, open(0).read().split())
b = set(a)
if len(a)==len(b):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a = Counter(a)
f = 0
for i in a.most_common():
    if i[1] != 1:
        print("NO")
        f = 1
        break
if f == 0:
    print("YES")

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())
a=list(map(int,input().split()))
s=set(a)
if len(s)==n:
  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(n-1):
    if a[i]==a[i+1]:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = sorted([int(i) for i in input().split()])

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

if not match:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A= list(map(int,input().split()))
A.sort()
flag = 0
for i in range(N-1):
    if A[i] == A[i+1]:
        flag = 1
        break
    else:
        continue

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=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=[int(x) for x in input().rstrip().split()]
A=list(set(A))

if N==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 = [int(a) for a in input().split()]
B = list(set(A))
if len(A) == len(B):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
n=int(input())
arr=[int(x) for x in input().split()]
l=set(arr)
l=list(l)
l.sort()
arr.sort()
if arr==l:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
a = sorted(s)
t = 0
d = 0
for c in a:
  if c == t:
    d += 1
    break
  t = c
if d == 1:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
from collections import Counter

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

c=Counter(int_s)

product =1
for i in list(c.values()):
    product*=i

if product==1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n=int(input())
a=set(map(int,input().split()))
b=len(a)
if n==b:
    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:
import sys
n = int(sys.stdin.readline())
li = list(map(int, sys.stdin.readline().split()))
if len(li) != len(set(li)):
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
A.sort()
for i in range(1, len(A)):
    if A[i - 1] != A[i]:
        k = True
    else:
        k = False
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

d = {}

for i in range(n):
  if a[i] not in d.keys():
    d[a[i]] = 1
  else:
    print('NO')
    sys.exit()

print('YES')

Submission status: Accepted

Solution code:
n = int(input())

an = map(int,input().split())

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

Submission status: Accepted

Solution code:
N = int(input())

set_nums = set(list(map(int, input().split())))

print('YES') if len(set_nums) == N else print('NO')

Submission status: Accepted

Solution code:
n = int(input())

an = map(int, input().split())

if len(set(an)) == n :
    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:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
acount = Counter(a)
if n == (len(list(acount.keys()))):
         print("YES")
else:
         print("NO")

Submission status: Accepted

Solution code:
import collections

n = int(input())
a = list(map(int,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:
import collections
N=int(input())
A=input().split()
c = collections.Counter(A)
if N==len(c):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

K = collections.Counter(A)
B = len(K)

if N == len(K):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc154/tasks/abc154_c

n=int(input())
a=list(map(int,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 = [int(i) for i in input().split()]
print('YES' if len(set(A)) == N else 'NO')

Submission status: Accepted

Solution code:
N = int(input())
alist = list(map(int,input().split()))
alist.sort()
p = 1
for i in range(N-1):
    if alist[i] == alist[i+1]:
        p = p*0
        print('NO')
        break
if p == 1:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
num = input().split()

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

Submission status: Accepted

Solution code:
import collections
a=int(input())
b=list(map(str,input().split()))
n=[]
for i in b:
    x=i.replace(' ',',')
    n.append(x)
c=collections.Counter(n)
n,values=zip(*c.most_common())
d=list(values)

if d.count(1)==a:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
A = input().split()
if N > len(set(A)):
    print('NO')
    sys.exit()
print('YES')

Submission status: Accepted

Solution code:
import sys
 
 
def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    a = list(map(int, readline().split()))
    a.sort()
    for i in range(1, n):
        if a[i] == a[i-1]:
            print("NO")
            exit()
    print("YES")
 
 
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import collections
import sys
N = input()
A = input().split()
A1 = map(int,collections.Counter(A).values())
for i in A1:
    if i >= 2:
        print('NO')
        sys.exit()
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
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()
for i in range(n-1):
	if A[i]==A[i+1]:
		print("NO")
		sys.exit()
print("YES")

Submission status: Accepted

Solution code:
n = int(input())

# 被りの要素が削除される
a = set(input().split())
print('YES' if len(a) == n else 'NO')

Submission status: Accepted

Solution code:
import collections

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

# リストaの要素の出現回数を計算
s = collections.Counter(a)

# 出現回数の最大値を取得
max_s = max(s.values())

if max_s == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
d = dict()
for i in range(n):
    d.setdefault(a[i])
if len(d) != n :
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

set_a = set(a)
print("YES" if len(set_a) == len(a) else "NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
sorta = sorted(a)
sflag = False
for i in range(n - 1):
  if sorta[i] == sorta[i + 1]:
    sflag = True
    break
if sflag == True:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections
n = int(input())
ls = list(map(int,input().split()))
if len(ls) == len(collections.Counter(ls)):
    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:
N = int(input())
A = [int(x) for x in 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:
n = int(input())
a = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
if(sorted(Counter([i for i in input().split()]).most_common(), key=lambda x: x[1], reverse = True)[0][1] > 1):
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()

    ret = 'YES'
    for i in range(1, N):
        if A[i]==A[i-1]:
            ret = 'NO'
            break
    print(ret)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
input();a=list(map(int,input().split()));print("NYOE S"[len(a)==len(set(a))::2])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split(" ")))
deta = set()
error = False

for i in range(n):
    if n == 0:
        pass
    elif error:
        break
    elif a[i] in deta:
        error = True
        break
    deta.add(a[i])
if error:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    A = sorted(A)
    different = True
    for i in range(N-1):
        if A[i] == A[i+1]:
            different = False
    if different:
        print("YES")
    else:
        print("NO")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    print("NO" if len(set(map(lambda x: int(x), input().split(" ")))) != N else "YES")

main()

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 = sorted(list(map(int, input().split())))
ans = "YES"
for i in range(n - 1):
    if a[i] == a[i + 1]:
        ans = "NO"
        break
print(ans)

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 = 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 = list(map(int,input().split()))
B = set(A)
print("YES" if len(B)==N else "NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    input()
    nums = list(map(int, input().split()))
    nums_count = {}

    for i in range(len(nums)):
        nums_count.setdefault(nums[i], 0)
        nums_count[nums[i]] += 1
        if nums_count[nums[i]] >= 2:
            print('NO')
            exit()
    print('YES')




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
num=int(input())
num_set={int(i) for i in input().split()}
if num==len(num_set):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stdin = open(0).read().split('\n')
N = int(stdin[0])
A = list(map(int,stdin[1].split()))
B = set(A)
print('YES' if len(A)==len(B) else 'NO')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = set(A_list)

if len(s) == N:
    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("NO")
else:
  print("YES")

Submission status: Accepted

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

c = 0

b = sorted(a) 

for i in range(n-1):
	if b[i] == b[i+1]:
		c += 1

if c >= 1:
	print('NO')
else:
	print('YES')

Submission status: Accepted

Solution code:
n = int(input())

L=list(map(int, input().split()))

S=set(L)

if n==len(S):
	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")