Problem:


Score : 300 points

Problem Statement

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

Constraints

2 ≤ N ≤ 200000

1 ≤ A_i ≤ 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

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

Sample Input 1

5
2 6 1 4 5

Sample Output 1

YES

The elements are pairwise distinct.

Sample Input 2

6
4 1 3 1 6 2

Sample Output 2

NO

The second and fourth elements are identical.

Sample Input 3

2
10000000 10000000

Sample Output 3

NO



Sample input:
5
2 6 1 4 5


Sample output:
YES

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
As = list(map(int, stdin.readline().rstrip().split()))

As.sort()

for i in range(n-1):
    if As[i] == As[i+1]:
        print("NO")
        exit()
    else:
        pass

print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("YES")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

N = input()
A = input().split()

B = set(A)
if len(A) == len(B):
    print('YES')
else:
    print('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
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

se = list(set(A))

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

Submission status: Accepted

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

Submission status: Accepted

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

ss=set(s)

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
a.sort()
tmp=-1
flag=True
for i in a:
    if tmp==i:
        flag=False
        break
    tmp=i
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8
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())
arr = list(map(int, input().split()))
st = set(arr)
if len(arr)!=len(st):
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()
isDistinct = True
for i in range(1, len(a)):
    if a[i - 1] == a[i]:
        isDistinct = False
        break

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

Submission status: Accepted

Solution code:
N = int(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())
l = list(map(int, input().split()))
x=len(l)
s=set(l)
y=len(s)
if x==y:
    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:
def A():
    temp = input().split()
    S = temp[0]
    T = temp[1]
    temp = [int(i) for i in input().split()]
    A = temp[0]
    B = temp[1]
    U = input()
    if U == S:
        print(A-1, B)
    else:
        print(A, B-1)

def B():
    print('x'*len(input()))

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

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:
def main():
    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')
            return

    print('YES')
    return



if __name__ == '__main__':
    main()

Submission status: Accepted

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

prev="x"
flag=False
for i in ls:
    if i==prev:
        flag=True
        break
    prev=i
if flag:
    print("NO")
else:
    print("YES")

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()))
tmp = set(a)
if len(a) == len(tmp):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n = int(input())

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

c = collections.Counter(a)

s = c.most_common()[0]

if s[1] == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N = II()
	A = LI()
	A.sort()
	pa= A[0]
	f = True
	for a in A[1:]:
		if(pa==a):
			f=False
			break
		pa = a
	if f :
		print("YES")
	else:
		print("NO")



main()

Submission status: Accepted

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

c = dict()
for i in b:
    if i in c:
        c[i] += 1
    else:
        c[i] = 1

done = True
for i in c:
    if c[i] > 1:
        print("NO")
        done  = False
        break

if done:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
MOD = 1000000007
INF = float("inf")

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

h = set()
for elem in A:
    if elem in h:
        print("NO")
        exit()
    h.add(elem)

print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=input()
a=list(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()))


sA = set(A)
if len(A) == len(sA):
    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:
def c_distinct_or_not():
    N = int(input())
    A = [int(i) for i in input().split()]
    return 'YES' if len(A) == len(set(A)) else 'NO'

print(c_distinct_or_not())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
A = [int(i) for i in 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()))
print('YES' if len(set(A))==N else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    resolve()

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

if lena == lenb:
    ans = "YES"
else:
    ans = "NO"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000)

def ii(): return int(input())
def iis(): return input().split()
def imi(): return map(int,iis())
def iil(): return list(imi())

k = set()
n = input()
a = input().split()
for i in a:
    if i in k:
        print('NO')
        sys.exit()
    k.add(i)
print('YES')

Submission status: Accepted

Solution code:
N=int(input())
D={}
L=list(map(int,input().split()))
for i in range(N):
    D[L[i]]=1
if len(D)==N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
A = sorted(A)
M = 0
for n in range(N):
    if M == A[n]:
        print("NO")
        exit()
    M = A[n]
print("YES")

Submission status: Accepted

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

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

c = collections.Counter(l)

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

Submission status: Accepted

Solution code:
n = int(input())
s = set([x for x in input().split()])
print("YES" if n == len(s) 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:
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()))

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

print(ans)

Submission status: Accepted

Solution code:
import collections
a = int(input())
b = input().split()
c = list(collections.Counter(b).values())
c.sort(reverse = True)
c = c[0]
if c == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
n = int(input())
a_ls = [int(i) for i in sys.stdin.readline().split()]
res = set()
ans = "YES"
for a in a_ls:
    if a not in res:
        res.add(a)
    else:
        ans = "NO"
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

set_A = set(A)

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

Submission status: Accepted

Solution code:
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(input()) #整数読み込み
def ifn(): return float(input()) #浮動小数点読み込み
def isn(): return input().split() #文字列読み込み
def imn(): return map(int, input().split()) #整数map取得
def fmn(): return map(float, input().split()) #浮動小数点map取得
def iln(): return list(map(int, input().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def fln(): return list(map(float, input().split())) # 浮動小数点リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 # 2点間の距離
def m_add(a,b): return (a+b) % MOD

N = iin()
A = iln()

s = set()
for i in range(N):
    if A[i] not in s:
        s.add(A[i])
    else:
        break
else:
    print('YES')
    exit()
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:
''' Hey stalker :) '''
INF = 10**10
def main():
    #print = out.append
    ''' Cook your dish here! '''
    n = get_int()
    li = get_list()
    if len(li)==len(set(li)):
        print("YES")
    else:print("NO")



''' Pythonista fLite 1.1 '''
import sys
from collections import defaultdict, Counter
from bisect import bisect_left, bisect_right
#from functools import reduce
import math
#input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
out = []
get_int = lambda: int(input())
get_list = lambda: list(map(int, input().split()))
main()
#[main() for _ in range(int(input()))]
print(*out, sep='\n')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    AN = list(map(int, input().split()))

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


main()

Submission status: Accepted

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

set_a = list(set(a))

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()]
if len(set(A)) == N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

d = {}

ans = 'YES'
for a in A:
  if a in d:
    ans = 'NO'
    break
  else:
    d[a] = 1

print(ans)

Submission status: Accepted

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

A.sort()

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

Submission status: Accepted

Solution code:
import sys


def resolve():
    input = sys.stdin.readline
    N = int(input())

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

    unique = len(list(set(A)))

    if len(A) == unique:
        print('YES')
        return

    print('NO')


resolve()

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
a = list(map(int, input().split()))
c = Counter(a).most_common()
print("NO" if c[0][1] > 1 else "YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
X = set()
flag = True
for i in input().split():
    if i in X:
        flag = False
        break
    X.add(i)
if flag:
    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:
n=int(input())
a=list(map(int,input().split()))
a.sort()
flag=True
for i in range(len(a)-1):
  if a[i]==a[i+1]:
    flag=False
if flag:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
now = set([])
for i in a:
    if i in now:
        print('NO')
        exit()
    now.add(i)
print('YES')

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


n = onem()


a = l()


a.sort()


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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in 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(map(int, input().split())))

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

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:
import numpy as np

N = int(input())
As = input().split()
As = np.array([int(a) for a in As])
Ua = np.unique(As)
if len(As) == len(Ua):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

if len(np.unique(nums)) == n:
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    a = [int(i) for i 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()))
if len(a)==len(set(a)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
c = Counter(map(int, input().split()))
yes = all(x == 1 for x in c.values())
print('YES' if yes else 'NO')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
tmp = ""
for aa in a:
    if aa == tmp:
        print('NO')
        exit()
    tmp = aa
print('YES')

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

n,*aaa = get_all_int()
memo = set()

for a in aaa:
    if a in memo:
        print("NO")
        exit()
    memo.add(a)
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

n = list(Counter(A).values())

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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 Counter
N = int(input())
A = list(map(int, input().split()))
c = Counter(A).values()
ans = "YES"
for v in c:
    if v > 1:
        ans = "NO"
print(ans)

Submission status: Accepted

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

a.sort()
ans = True

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

from collections import Counter
def main():
    n = II()
    a_s = LI()
    if len(Counter(a_s)) == n:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

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:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline
INF = 10**9

seen = set()
n = int(input())
a = [int(item) for item in input().split()]
for item in a:
    if item in seen:
        print("NO")
        exit()
    else:
        seen.add(item)
print("YES")

Submission status: Accepted

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

if __name__ == '__main__':
    main()

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

mou = set([])
for i in range(n):
    if a[i] not in mou:
        mou.add(a[i])
    else:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
from math import factorial
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def MI(): return map(int, input().split())


def S(): return input()


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


def MS(): return map(str, input().split())


YN = {False: 'No', True: 'Yes'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']


# show_flg = False
show_flg = True


def main():
    N = I()
    A = LI()
    a = set()

    for i in range(N):
        a.add(A[i])

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

an1=len(a)
an2=len(set(a))

if an1==an2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:


#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    n = ii()
    a = li()
    a = list(sorted(a))
    tmp = -1
    for i in a:
        if tmp == i:
            print("NO")
            exit()
        else:
            tmp = i

    print("YES")

main()

Submission status: Accepted

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

a_ = list(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()))
print('YES' if len(list(set(a)))==n else 'NO')

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:
import sys
def input(): return sys.stdin.readline().rstrip()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in 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()))
if (len(A)==len(set(A))):
    print("YES")
else:
    print("NO")