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 = [int(v) for v in input().split()]
a.sort()
a.append(-1)
d = 1
for i in range(0, n):
    if(a[i] == a[i + 1]):
        d = 0
        print("NO")
        break
if(d == 1):
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
cnt={}
for i in range(n):
    cnt[a[i]]=0
ok=1
for i in range(n):
    cnt[a[i]]+=1
    if cnt[a[i]]==2:
        print("NO")
        ok=0
        break
if ok==1:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    N = int(input())
    #N, K = map(int, input().split())
    A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

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




if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s_number = set(number)

print("YES" if len(number) == len(s_number) else "NO")

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
ASet = set(A)
if len(A)==len(ASet):
    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())
lis = [x for x in input().split()]
lis.sort()

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

Submission status: Accepted

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

    return 'NO'


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

print(actual(n, A))

Submission status: Accepted

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

Auni = set(A)

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

Submission status: Accepted

Solution code:
already = {}
n = int(input())
a = list(map(int, input().split()))
for x in a:
    if already.get(x):
        print("NO")
        break
    already[x] = True
else:
    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:
def solve():
  N = int(input())
  A = list(map(int, input().split()))
  A.sort()
  for i in range(1, N):
    if A[i - 1] == A[i]:
      print('NO')
      return
  print('YES')
  return
solve()

Submission status: Accepted

Solution code:
#C
N = int(input())
A = list(map(int,input().split()))
flag = True
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()))
a.sort()

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

print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n - 1):
    if a[i] == a[i + 1]:
        y = False
        break
        
if y:
    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(input().split())

if len(a) == 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()))
cnt = Counter(a)

if max(cnt.values()) == 1:
    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:
import collections

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

a = collections.Counter(A)

if 1 < max(a.values()):
    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:
import collections
N = int(input())
A = list(map(int, input().split()))
cnt = collections.Counter(A)
 
if cnt.most_common()[0][1] > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
dic = {}
flag = 0

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

for num in A:
    if num in dic:
        flag += 1
    else:
        dic[num] = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


N =int(input())


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

l.sort()
f=1
for i in range(0,N-1):
    
    if l[i]==l[i+1]:
        f=0
        break


if f!=0:
        print("YES")

else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
from collections import Counter
ca=Counter(a)
for v in dict(ca).values():
  if v>1:
    print('NO')
    exit(0)
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    N = II()
    A = LI()
    numa = len(set(A))
    #print(numa)
        
    if numa == N:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
# Vicfred
# https://atcoder.jp/contests/abc154/tasks/abc154_c
# sorting
n = int(input())
a = list(map(int, input().split()))

a.sort()

repeated = False
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        repeated = True
        break

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

Submission status: Accepted

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

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())
A = list(map(int,input().split()))
c = Counter(A)
if c.most_common()[0][1] >= 2:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N=int(input())
S=list(map(int,input().split()))
dic={}
for i in range(N):
    dic[S[i]]=1

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

Submission status: Accepted

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

A_list_new = list(set(A_list))

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

Submission status: Accepted

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

Submission status: Accepted

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

S.sort()
banpei=0
for i in range(N):
    if banpei==S[i]:
        print("NO")
        exit()
    else:
        banpei=S[i]
    
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())
x=list(map(int,input().split()))
from collections import Counter
ans=Counter(x)


import sys
for i in ans:
  if ans[i]!=1:
    print("NO")
    sys.exit()

print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, *a = map(int, open(0).read().split())
if len(a) == len(set(a)):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
a.sort()
s=""
r=0
for m in a:
  if m == s:
    r=1
  s=m
if r ==1:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N =int(input())

d = {}

for word in input().split():
    if word in d:
        print("NO")
        exit()
    else:
        d[word] = 1

print("YES")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input()) 
L = list(map(int, input().split()))

S = set(L)

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

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

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

if(dup(li)): 
    print("NO")
else:
     print("YES")

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

Submission status: Accepted

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

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

else: print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
memo = {}
ans = "YES"

for a in A:
    if a in memo:
        ans = "NO"
        break
    memo[a] = None

print(ans)

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
flag=True
inList=list(map(int,input().split()))

c=Counter(inList)
cv=list(c.values())
for i in cv:
    if i!=1:
        print('NO')
        flag=False
        break
if flag:
    print('YES')

Submission status: Accepted

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

# if has_duplicates(a) == True:
#   print('No')
# elif has_duplicates(a) == False:
#   print('Yes')

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

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

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

Submission status: Accepted

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

As = set(A)

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A.sort()
res = A[0]
cnt = True
for n in range(1, N):
    if A[n] == res:
        cnt= False
    res = A[n]
if cnt:
    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("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
input()
a = input().split()

ans = "YES"
x = {}
for i in a:
    if x.get(i, False):
        ans = "NO"
        break
    x[i] = True

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

n_list = map(int,input().split())
n_set = set(n_list)

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

c = collections.Counter(a)
v  = c.values()
ans = 0
for i in v:
  if i == 1:
    ans += 1
if ans == n:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


def solve(N, As):
    As.sort()
    for i in range(1, N):
        if As[i - 1] == As[i]:
            print('NO')
            return
    print('YES')


if __name__ == '__main__':
    N = int(input())
    As = [int(i) for i in input().split()]
    solve(N, As)

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:
from collections import Counter

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N - 1):
  if s[i] == s[i + 1]:
    print("NO")
    count += 1
    break
    
if count == 0:
  print("YES")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=list(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()))
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()))
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()))
A=set(A)
#集合を使う
if len(A)==N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    A = tuple(map(int, input().split()))
    s = set()
    for a in A:
        if a in s:
            print("NO")
            exit()
        else:
            s.add(a)
    print("YES")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hs = {}
int(input())
nn = [int(x) for x in input().split()]

def c():
    for x in nn:
        if x in hs:
            print("NO")
            return
        hs[x] = 1
    print("YES")

c()

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
A = tuple(map(int, input().split()))
s = set()
for a in A:
    if not a in s:
        s.add(a)
    else:
        print('NO')
        break
else:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    N = int(readline())
    As = list(map(int, readline().split()))
    if len(As) == len(set(As)):
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
print('YNEOS'[len(set(input().split()))!=n::2])

Submission status: Accepted

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

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

sa = set(a)

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

x = set()
for i in a:
  if i in x :
    ck = False
    break
  else :
    x.add(i)
else : 
  ck = True

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
d = defaultdict(int)
A = list(map(int,input().split()))

for a in A:
    if d[a] == 1:
        print('NO')
        exit()
    else:
        d[a] += 1

print('YES')

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

new_list = set(num_list)

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

Submission status: Accepted

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

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

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 n == len(B):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
n = int(input())

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

lset = set(lst)

if len(lset) == len(lst):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

num=len(l)
if num==len(set(l)):
  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:

class abc_154:
    
    def __init__(self):
        pass
    
    def A(self):
        pass
    def B(self):
        pass
    def C(self):
        N=int(input())
        A=list(map(int,input().split()))
        B=list(set(A))
        
        ans= "YES" if len(A)==len(B) else "NO"
        print(ans)
                
    def D(self):
        pass
    def E(self):
        pass
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_154()
    obj.C()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
# import math
# import itertools
# from collections import deque
# from collections import defaultdict
# import heapq
# import copy
# import bisect
# import numpy as np
# from scipy.special import comb

# def my_input(): return sys.stdin.readline().rstrip()
# sys.setrecursionlimit(100000)
# INF = 1001001001001
# MOD = 1000000007

def main():

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

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

Submission status: Accepted

Solution code:
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('YES')
else:
    print('NO')