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

h=sorted(h)
flag=False
for i in range(len(h)-1):
    if (h[i]==h[i+1]):
        flag=True
print('NO' if flag else '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 = input()
a = map(int, raw_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()))
moto = len(A)
unique = set(A)

if moto == len(unique):
    print("YES")
else :
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

s = input().split()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.sort()
c = 'YES'

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

Submission status: Accepted

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

d = {}
for x in As:
    if x not in d.keys():
        d[x] = 1
    else:
        d[x] += 1
if len(As) == len(d):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = int(input())

A = list(map(int,input().split()))
A.sort()
hantei = 0
for i in range(len(A)-1):
    if A[i] == A[i+1]:
        hantei = 1
        break
    
if hantei == 0:
    print("YES")
elif hantei == 1:
    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())
ilist = list(map(int,input().split()))
iset = set(ilist)
if len(ilist) == len(iset):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n=int(input())
p=list(map(int,input().split()))
p.sort()
ans=True
for i in range(0,n-1):
    if(p[i]==p[i+1]):
        ans=False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
a=[int(x) for x in 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()))
count = 0

A.sort()

for i in range(0, N - 1):
    if A[i] == A[i + 1]:
        count += 1
        break
    else:
        pass

if count == 0:
    print('YES')

else:
    print('NO')

Submission status: Accepted

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

a.sort()

def solve():
    for i in range(n-1):
        if a[i] == a[i + 1]:
            return "NO"
    return "YES"

print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
l = sorted([int(x) for x in input().split()])
ans = 'YES'
for i in range(N-1):
  if l[i] == l[i+1]:
    ans = 'NO'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
List=list(map(int,input().split()))
if len(List) == len(set(List)):
	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())
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()) # 数字を変数に格納
List = list(map(int,input().split())) # 複数の数字をリストに格納

List.sort()
result = 'YES'

for i in range(N-1):
    if List[i] == List[i+1]:
        result = 'NO'
        break
        
print(result)

Submission status: Accepted

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

A.sort()

error = 0

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

if error == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

bA = len(A)
aA = len(set(A))

if bA == aA:
    print("YES")
else:
    print("NO")

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def prime_factorize(a, n):
    now = len(a) - 1
    while n % 2 == 0:
        if now == -1:
            a.append(2)
            now += 1
        elif a[now] != 2:
            a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            if now == -1:
                a.append(f)
                now += 1
            elif a[now] != f:
                a.append(f)
                now += 1
            n //= f
        else:
            f += 2

    if n != 1:
        if now == -1:

            a.append(f)
        elif a[now] != n:

            a.append(n)
    return a

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

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())

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

dic = {}

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

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

Submission status: Accepted

Solution code:
#from collections import Counter
n=int(input())
arr=list(map(int,input().split()))
di={}
for i in arr:
  if i in di:
    print("NO")
    break
  else:
    di[i]=1
else:
  print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

N = int(input())

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

rm_dup = len(set(P))

if rm_dup != N:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

    N = int(input())
    A = list(map(int, input().split()))
    if len(A) == len(set(A)):
        return 'YES'
    return 'NO'

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
se = set()
ans = True
for i in range(N):
  if A[i] in se:
    ans = False
    break
  se.add(A[i])

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a = int(input())
    b = [int(i) for i in input().split()]
    c = list(set(b))

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

Submission status: Accepted

Solution code:
N = int(input())
number_list = input().split(" ")
if len(set(number_list)) == N:
	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_set = set(list(map(int, input().split())))

print("YES" if len(a_set) == n else "NO")

Submission status: Accepted

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

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())
li = list(map(int,input().split()))
ans = "YES"
s = set()
for i in range(n):
  first = len(s)
  s.add(li[i])
  second = len(s)
  if first == second:
    ans = "NO"
    break
print(ans)

Submission status: Accepted

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

A_dict = {}
for i in A:
    if not i in A_dict:
        A_dict[i] = 1

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

Submission status: Accepted

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

A_dict = {v: i for i, v in enumerate(A_list)}

len_prior = len(A_list)
len_after = len(A_dict)

if len_prior == len_after:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__=="__main__":
    n = int(input())
    a = input().split() 

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b=input()
a=sorted([int(x) for x in input().split()])
c=0
while True:
    if a[c]==a[c+1]:
        ANS=False
        break
    if c==len(a)-2:
        ANS=True
        break
    c+=1
if ANS:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

#print(A)
#print(set(A))

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

Submission status: Accepted

Solution code:
n = int(input())
a_n = list(map(lambda x:int(x),input().split()))

list_len = len(a_n)
set_len = len(set(a_n))

if list_len == set_len:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#python3
def main():
    n = int(input())
    a = [i for i in input().split()]
    s = set(a)
    set_length = len(s)
    array_length = len(a)

    if set_length == array_length:
        print('YES')
    else:
        print('NO')

main()

Submission status: Accepted

Solution code:
def has_duplicates(seq):
    return len(seq) != len(set(seq))
N = input().rstrip().split(' ')[0]
print('NO') if has_duplicates([int(i) for i in input().rstrip().split(' ')]) else print('YES')

Submission status: Accepted

Solution code:
N = input()
a = input()

aa = a.split(' ')

def_len = len(aa)
cal_len = len(set(aa))

if(def_len == cal_len):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

    a.sort()

    for i in range(1,len(a)):

        if a[i] == a[i-1] :

            print('NO')
            return
    print('YES')
if __name__=='__main__':
    main()

Submission status: Accepted

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

if len(A_list) == len(B_list):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

import collections
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()))

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

Submission status: Accepted

Solution code:
length = int(input())
numList = input().split()
checkSet = set()
for num in numList:
  checkSet.add(num)
if(len(checkSet) == len(numList)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

def func1(num):
    return len(num) == len(set(num))


if func1(a_list) == True:
    print("YES")

else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
tmp = input().split()

A = [int(tmp[i]) for i in range(N)]

A.sort()


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

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

Submission status: Accepted

Solution code:
N = int(input())
A_list = []

hoge = input().split()

for i in range(N):
  A_list.append(int(hoge[i]))
  
len_org = len(A_list)
len_uniq = len(list(set(A_list)))

if len_org == len_uniq:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    n = int(args[0])
    A = list(map(int, args[1].split()))

    A.sort()
    p = A[0]
    for a in A[1:]:
        if a == p:
            return 'NO'
        p = a

    return 'YES'


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
def main():
    hoge = input()
    huga = list(map(int, input().split()))
    if len(huga) == len(set(huga)):
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

A = input().split()

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

Submission status: Accepted

Solution code:
input_s = [input() for i in range(2)]
n = int(input_s[0])
num_list= list(map(int,input_s[1].split()))
if n == len(list(set(num_list))):
    print("YES")
else:
    print("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()))
s = set()

for i in range(n):
    s.add(a[i])
    
if len(a) == len(s):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def main():
	n = int(input())
	a = list(map(int,input().split()))
	a.sort()
	ans = 0
	for i in range(len(a)-1):
		if a[i] == a[i+1]:
			ans = 1
	if ans == 1:
 		print("NO")
	else:
 		print("YES")
	
 
if __name__ == '__main__':
	main()

Submission status: Accepted

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

ans = set(list)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
a = list(map(int, input().split()))
print('YNEOS'[len(a) > len(set(a))::2])

Submission status: Accepted

Solution code:
import collections

N = int(input())
A = list(input().split())
a = len(collections.Counter(A))
n = len(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = a[0]
for i in range(1,n):
    if a[i] == tmp:
        print('NO')
        break
    else:
        tmp = a[i]
else:
    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 = list(input().split())

A_list.sort()

for i in range(len(A_list) - 1):
    if A_list[i] == A_list[i + 1]:
        print('NO')
        break
    elif i == len(A_list) - 2 and A_list[i] != A_list[i+1]:
        print('YES')
        break
    else:
        continue

Submission status: Accepted

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

is_distinct = len(A) == len(set(A))

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(data1) == len(data2):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
N=int(input())
A=[int(x) for x in input().split()]
A.sort()
tf="YES"
for i in range(len(A)-1):
    if A[i]==A[i+1]:
        tf="NO"
print(tf)

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())
Al = list(map(int,input().split()))
orglen = len(Al)
uniqlen = len(set(Al))

if(orglen==uniqlen):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A_LIST = list(map(int,input().split()))
acnt = len(A_LIST)
bcnt = len(set(A_LIST))
#print(acnt, bcnt)
if acnt == bcnt:
    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(N-1):
   if A[i]==A[i+1]:
      flag=False
      print("NO")
      break

if flag:
   print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
import math
from fractions import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    vn = vk = vn_k = 1
    for i in range(1, n+1):
        vn = vn * i % modp
        if i == k:
            vk = vn
        if i == n-k:
            vn_k = vn
    return vn * get_inv(vk, modp) * get_inv(vn_k, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp

#

def main():
    input()
    A = lmis()
    if len(A) == len(set(A)):
        print('YES')
    else:
        print('NO')



main()

Submission status: Accepted

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

s=set(a)

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

Submission status: Accepted

Solution code:
cnt = int(input())
tar_array = input().split()
tar_array.sort()

out = "YES"
tar = ""
for i in range(cnt):
  if tar == tar_array[i]:
    out = "NO"
    break
  tar = tar_array[i]

print(out)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
lst = input().split()
sett = set(lst)

if len(lst) == len(sett):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

A.sort()

ret = "YES"
for i in range(N-1):
  if A[i] == A[i+1]:
    ret = "NO"
    break

print(ret)

Submission status: Accepted

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

print("YES" if len(A_list) == len(set(A_list)) else "NO")

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=set(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()))

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

la = set(a)

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

Submission status: Accepted

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

mycounter = Counter(a_list)

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

Submission status: Accepted

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

for a in A:
  if a not in A_:
    A_[a] = 1
  else:    
    A_[a] += 1
    break
if len(A) == len(A_):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N=input()
A=input().split()
A.sort()
OK=True 
for i in range(len(A)-1):
  if A[i]==A[i+1]:
    OK=False
    break
if OK:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N = int(input())

A = [0] * N
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import numpy as np

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

a=np.sort(np.array(a))
tmp=a[0]
k=0

for i in range(1,n):
  if tmp==a[i]:
    k=1
  else:
    tmp=a[i]
    
if k==0:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = int(input())
A = list(map(int, input().split()))
A.sort()
flg=False
for i in range(S-1):
  if A[i]==A[i+1]:
    flg=True
    break
if flg==True:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
import sys

def main():
    tmp = input()
    k = input().replace('\n','').split()
    k = [int(k) for k in k]
    if len(k) != len(set(k)):
        print('NO')
    else:
        print('YES')
if __name__ == '__main__':
    input = sys.stdin.readline
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()
    res = "YES"
    for i in range(N-1):
        if(A[i] == A[i+1]): res = "NO"
    print(res)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
_ = 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.sort()
ans = 'YES'
for i in range(1,n):
    if a[i-1] == a[i] :
        ans = 'NO'
        break
print(ans)

Submission status: Accepted

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

n_As = len(As)
n_unique = len(set(As))

if n_As == n_unique:
    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:
n = int(input())
l = list(map(int, input().split()))
l.sort()

same = False
for i in range(0, n-1):
    if l[i] == l[i+1]:
        same = True
        break

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

Submission status: Accepted

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

a = set(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L_a = [int(s) for s in input().rstrip().split(' ')]
l_a = set(L_a)
if len(l_a) == len(L_a):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N=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:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
import queue
import copy

# 最大公約数
def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
  if x%y == 0:
    return y
  else:
    while x%y != 0:
      z = x%y
      x = y
      y = z
    else:
      return z

# 幅優先探索(BFS)でスタート座標(x, y)からの最大距離返す
def bfs(SS, x, y, H, W):#入力(座標系(迷路), x, y, xの端, yの端)
  x_next = [0, 0, -1, 1]
  y_next = [1, -1, 0, 0]
  tempx = x
  tempy = y
  mlength = 0
  q = deque()
  xytuple = (x, y, 0)
  q.append(xytuple)


  while q:
    xytuple = q.popleft()
    SS[xytuple[0]][xytuple[1]] = "x" #探索した場所は探索できないようにする
    for i in range(4): #このforで上下左右を調べてる
      tempx = xytuple[0] + x_next[i]
      tempy = xytuple[1] + y_next[i]
      #print(tempx, tempy, xytuple[2])
      #print(S)
      if(0 <= tempx and tempx < H and 0 <= tempy and tempy < W and SS[tempx][tempy] == "."):
        temptuple = (tempx, tempy, xytuple[2]+1)
        SS[temptuple[0]][temptuple[1]] = "x" #探索した場所は探索できないようにする
        mlength = max(mlength, xytuple[2] +1)
        q.append(temptuple)
      #print(q)
  return mlength

#素因数分解
def prime_factorize(n):
  a = []
  while n % 2 == 0:
    a.append(2)
    n //= 2
  f = 3
  while f * f <= n:
    if n % f == 0:
      a.append(f)
      n //= f
    else:
      f += 2
  if n != 1:
    a.append(n)
  return a

#重複を検出
def has_duplicates(seq):
  return len(seq) != len(set(seq))



#X = str(input()).split()
#a = [int(x) for x in input().split()]


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

if(has_duplicates(A) == True):
  ans = "NO"
else:
  ans = "YES"


print(ans)

Submission status: Accepted

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

N=int(input())
A=sorted(acinput())

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

print(res)

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")
                quit()
print("YES")

Submission status: Accepted

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

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


if has_duplicates(A) == False:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

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

if len(set(nums)) == n:
  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')