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

num.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
l = [int(x) for x in input().split()]
from collections import defaultdict
d = defaultdict(int)
for i in range(N):
    if d[l[i]] == 1:
        print("NO")
        exit()
    d[l[i]]= 1
print("YES")

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(int,input().split()))
print('YES' if len(set(s))==n else '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(map(int, input().split()))
a_2 = set(a)
if len(a) == len(a_2):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#154 Distinct or not
n = int(input())
a = list(map(int,input().split()))
b = len(set(a))

if len(a) == b:
    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(len(a)-1):
    if a[i] == a[i+1]:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
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:
n = int(input())
a = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
A = list(map(int,input().split()))
c= collections.Counter(A)
if len(c)==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:
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    N = input(int)
    A = input([int, N])
    yesno(len(A) == len(set(A)), upper=True)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    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:
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())
a = list(map(int,input().split()))
a_set = set(a)
if len(a) > len(a_set):
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

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()))
b=set()
for i in a:
  b.add(i)
if len(a)==len(b):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
n = 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())
data = list(map(int, input().split()))

pond = set()
for num in data:
    if not num in pond:
        pond.add(num)
    else:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
from collections import Counter
import sys
N = int(input())
A = [int(x) for x in input().split()]

C = dict(Counter(A))
for a in C:
    if C[a] > 1:
        print('NO')
        sys.exit()
print('YES')

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:
import math

n = int(input())
aL = list(map(int, input().split(" ")))

s = set()
for a in aL:
    if a in s:
        print("NO")
        exit()
    else:
        s.add(a)

print("YES")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    mm = {0:0}

    ans = 'YES'
    for i in range(n):
        if mm.get(a[i]) != None:
            ans = 'NO'
            break
        else:
            mm[a[i]] = 1
    
    print(ans)

main()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, *a = map(int, sys.stdin.read().split())

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

if __name__ ==  '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
la = len(A)
B = set(A)
lb = len(B)
if la == lb:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def judge(s):
  s=sorted(s)
  ls=len(s)
  t=list(set(s))
  lt=len(t)
  if ls==lt:
    return "YES"
  else:
    return "NO"

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
dic = {}
for i in range(n):
	try:
		dic[a[i]] += 1
	except:
		dic[a[i]] = 1
if max(dic.values()) > 1:
	print("NO")
else:
  	print("YES")

Submission status: Accepted

Solution code:
# N = 5
# ARR = [2, 6, 1, 4, 5]

# N = 6
# ARR = [4, 1, 3, 1, 6, 2]
#
#
# N = 2
# ARR = [10000000, 10000000]

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

def calculate(n,arr):

    dict = {}
    result = True
    for i in range(n):
        item = arr[i]
        if dict.get(item) == None:
            dict.__setitem__(item,True)
        else:
            result = False
            break
    if result == True:
        print("YES")
    else:
        print("NO")

calculate(N,ARR)

Submission status: Accepted

Solution code:
N = int(input());

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

A_ = list(set(A));

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
A = rl()

h = {}
for a in A:
	if a in h:
		print('NO')
		exit()
	h[a] = 1
print('YES')

Submission status: Accepted

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

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:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = sorted(readInts())
    dic = {}
    for a in A:
        if a in dic:
            print('NO')
            exit()
        else:
            dic[a] = 1
    print('YES')
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
s=input()
t=list(map(int,input().split()))
u=len(t)
v=len(set(t))

if u == v:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from  collections import Counter
n = int(input())
a = Counter([int(x) for x in input().split()])
print('NO') if len(a)!=n else print('YES')

Submission status: Accepted

Solution code:
from  collections import Counter
n = int(input())
a = Counter([int(x) for x in input().split()])
print('NO') if a.most_common()[0][1]>1 else print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''

N = int(input())
arr = list(map(int,input().split()))
arr.sort()
ans = 0
for i in range(N-1):
	if arr[i]==arr[i+1]:
		ans = 1
		break

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

Submission status: Accepted

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

dict1 = {}
for i in range(n):
  if dict1.get(an[i], -1) == -1:
    dict1[an[i]] = 1
  else:
    dict1[an[i]] += 1
    
for a, b in dict1.items():
  if b != 1:
    print('NO')
    exit()
    
print('YES')

Submission status: Accepted

Solution code:
N=int(input())
A=set(map(int,input().split()))
print('YNEOS'[N!=len(A)::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

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

d = defaultdict(int)

for i in range(n):
    if a[i] in d.keys():
        d[a[i]] += 1
    else:
        d[a[i]] = 1

if max(d.values()) >= 2:
    print("NO")
else:
    print("YES")

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:
a=int(input())
b=list(map(int,input().split()))
d=len(b)
c=len(set(b))
if c==d:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#C

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 math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()

A = FLI()

flg = len(set(A)) == n

print("YES" if flg else "NO")

Submission status: Accepted

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

Submission status: Accepted

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

s = set(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
num = list(map(int,input().split()))
num = sorted(num)
for i in range(n-1):
  if num[i]==num[i+1]:
    print('NO')
    exit()
print('YES')

Submission status: Accepted

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

B =list(set(A))

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

Submission status: Accepted

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

x = 0

for i in range(n-1):
    if a[i] == a[i+1]:
        x += 1
        break
    else:
        x += 0
        
if x == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

l.sort()

print('YES' if all([l[i]!=l[i+1] for i in range(n-1)]) else 'NO')

Submission status: Accepted

Solution code:
import sys, 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, groupby
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(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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()))
from collections import Counter
dic = Counter(a)
if len(dic) == n:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A.sort()
flag = 1
for i in range(N-1):
  if(A[i] == A[i+1]):
    flag = 0
    break
    
if(flag == 1):
  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(map(int, input().split()))

s = {}
flag = 0

for i in range(n):
    t = a[i]
    s.setdefault(t, 0)
    if s[t] == 0:
        s[t] = 1
    else:
        print("NO")
        flag = 1
        break

if flag == 0:
    print("YES")

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

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:
n =int(input())
a =list(map(int ,input().split()))
s =set(a)
if len(a) >len(s):
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A=[int(_) for _ in input().split()]
    if len(set(A))==n:print("YES")
    else:print("NO")

if __name__=='__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

print("YES" if l==m else "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:
# ABC154 -virtual
# A
# B
# C
if True:
    N=int(input())
    A=[int(i) for i in input().split()]
    print('YES' if len(A)==len(set(A)) else 'NO')
# D
# E
# F

Submission status: Accepted

Solution code:
N=int(input())
A=[int(item) for item in input().split()]
S=set()
for i in range(N):
    if A[i] in S:
        print("NO")
        exit()
    else:
        S.add(A[i])

print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = set(map(int, input().split()))
ans = "YES"
if len(a) != n: #setは重複させないから。
  ans = "NO"
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
a = list(map(int, readline().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()))
print('YES' if len(list(set(a))) == n else '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:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = lr()
bl = len(set(A)) == N
print('YES' if bl else 'NO')

Submission status: Accepted

Solution code:
"""
int(input())
map(int,input().split())
list(map(int,input().split()))

"""

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

Submission status: Accepted

Solution code:
import sys
N = int(input())

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

a.sort()

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

Submission status: Accepted

Solution code:
import os

def main():
	num = int(input())
	list_num = set(map(int, input().split()))
	if len(list_num) != num:
		print("NO")
	else:
		print("YES")

if __name__ == "__main__":
	main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
values,counts = zip(*c.most_common())
if counts[0] != 1:
    print('NO')
else :
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N-1):
  if An[i] == An[i+1]:
    print("NO")
    sys.exit()
print("YES")

Submission status: Accepted

Solution code:
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理

A.sort()
t=0
for i in range(N-1):
    if A[i]==A[i+1]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s = collections.Counter(A)
if len(s.keys()) == N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

if N==len(An):
    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())
a = [int(v) for v in input().split()]
a.sort()

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

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


if __name__ == "__main__":
    main()

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=sorted(list(input().split()))
flag=1
for i in range(N-1):
  if A[i]==A[i+1]:
    flag=0
    break
if flag==1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())))
b = np.unique(a)
if len(b) == n:
    print('YES')
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 = sorted(map(int,input().split()))
answer = 'YES'

for i in range(N-1):
    if A[i] == A[i+1]:
        answer = 'NO'
        break

print(answer)

Submission status: Accepted

Solution code:
n = int(input())

a_list = [int(s) for s in input().split()]
a_set = set(a_list)

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

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:
import collections
N = int(input())
A = list(map(int,input().split()))
ans = collections.Counter(A)
pr = 'YES'
for i in ans.values():
    if i > 1:
        pr = 'NO'
print(pr)

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(map(int,input().split()))
if len(set(a)) == len(a):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
def print_ans(N, ar):
    """Test Case
    >>> print_ans(5, [2, 6, 1, 4, 5])
    YES
    >>> print_ans(6, [4, 1, 3, 1, 6, 2])
    NO
    >>> print_ans(2, [10000000, 10000000])
    NO
    """
    br = set(ar)
    print("YES" if len(br) == N else "NO")
    

if __name__ == '__main__':
    N = int(input().rstrip())
    ar = list(map(int,input().rstrip().split()))
    print_ans(N, ar)

Submission status: Accepted

Solution code:
n = int(input())
num = list(map(int, input().split()))
dic = {}

for i in range(n):
  if num[i] not in dic:
    dic[num[i]] = 1
  else:
    print('NO')
    exit()

print('YES')

Submission status: Accepted

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

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]==a[i-1]):
    print('NO')
    break
    
else: print('YES')

Submission status: Accepted

Solution code:
from collections import Counter

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A.sort()
a=-1
ndup=True
for e in A:
    if a==e:
        ndup=False
    else:
        pass
    a=e
if ndup==True:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = set(map(int, input().split()))
if len(A)==N:
    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('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = 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:
import collections

N=input()
A=[int(s) for s in input().split(" ")]

B=collections.Counter(A)

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
f=0
for i in c.values():
    if i>1:
        f+=1
        break
if f==1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()
a=n1()

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