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

Submission status: Accepted

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

a_ = list(set(a))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    if int(input()) == len(set(input().split())):
        return 'YES'
    else:
        return 'NO'

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

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

Submission status: Accepted

Solution code:
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(raw_input())
A = map(int,raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

set_ls = set(ls)

if len(ls) == len(set_ls):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

def main():
    n = int(input())
    li = list(input().split())
    setli = set(li)
    if len(li) != len(setli):
        print('NO')
    else:
        print('YES')
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

flag = 0
d = {}
for i in A:
    if i not in d:
        d[i] = 0
    else:
        flag = 1
if flag == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

ls = list(input().split())
a = len(ls)
ls = set(ls)

print("YES" if a==len(ls) else "NO" )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools

mod = int(1e9+7)

def main():
    n = int(input())
    a = list(map(int,input().split()))
    a.sort()
    for i in range(1,n):
        if a[i] == a[i-1]:
            print('NO')
            return
    print('YES')
    return

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

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

Submission status: Accepted

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

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

print(S)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N, *A = map(int, read().split())
A_ = list(set(A))

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

Submission status: Accepted

Solution code:

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

a = set(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from functools import *
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def Golf():
    *a,=map(int,open(0))
def S_():
    return input()
def IS():
    return input().split()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0}):
#h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0}) # sample usage
    mp=[1]*(w+2)
    found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['YES','NO']

mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
#sys.setrecursionlimit(10**7)
input=lambda: sys.stdin.readline().rstrip()
 
def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a
 
show_flg=False
show_flg=True
 
ans=0

n=I()
a=LI()
s=set()
for i in a:
    s.add(i)

if len(s)==n:
    k=0
else:
    k=1
print(YN[k])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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(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 = len(A)
B = list(set(A))
b = len(B)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	A = getlist()
	D = defaultdict(int)
	judge = "YES"
	for i in range(N):
		if D[A[i]] == 1:
			judge = "NO"
			break

		D[A[i]] = 1

	print(judge)


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

if len(As) - len(set(As)) == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    d = dict()
    A = [int(s) for s in input().split()]
    for a in A:
        if a in d.keys():
            print("NO")
            return
        d[a] = True
    print("YES")
main()

Submission status: Accepted

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

from collections import defaultdict
d = defaultdict(int)

for num in a:
    if d[num]!=0:
        print("NO")
        exit()
    d[num]+=1

print("YES")

Submission status: Accepted

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

set_A = set(A)

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

Submission status: Accepted

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

if len(al) == len(tmp):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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

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

Submission status: Accepted

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

set_an = set(an)

print("YES" if len(set_an) == N else "NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
#codeforces
gi = lambda : list(map(int,input().split()))
n, = gi()
a = gi()
print("YNEOS"[len(set(a)) != n::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = len(set(list(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()))
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()))
k=list(set(a))
if len(k)==len(a):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
#s = input()
da = list(map(int,input().split()))
#a,b = map(int,input().split())

da.sort()

ju = True
for i in range(n-1):
    if da[i] == da[i+1]:
        ju = False
        break
if ju:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

    

main()

Submission status: Accepted

Solution code:
import collections

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

C = collections.Counter(A)

flag = True
for n, c in C.items():
    if c > 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)
if n==len(s):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
if len(set([int(x) for x in input().strip().split()])) == 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(b)<len(a):
    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 = set(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, A):
    return 'YES' if len(set(A)) == len(A) else 'NO'


def main():
    N = read_int()
    A = read_int_n()
    print(slv(N, A))


if __name__ == '__main__':
    main()

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 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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

from collections import Counter
def main():
    n=II()
    aa=LI()
    cnt=Counter(aa)
    ans="YES"
    for v in cnt.values():
        if v>1:ans="NO"
    print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math

import itertools

#import bisect

import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]



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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 'NO'
A.sort()
for i in range(1, N):
    if A[i] == A[i - 1]:
        break
    else:
        continue
else:
    ans = 'YES'

print(ans)

Submission status: Accepted

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

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

b=set(a)

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
s = input()

print("x" * len(s))
"""

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:
#!/usr/bin/env python

from collections import deque, defaultdict
import itertools as ite
import sys
import math
from decimal import *

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N = input()
A = map(int, raw_input().split())
A = sorted(A)
for i in range(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()))
from collections import defaultdict
d=defaultdict(int)
for a in A:
    d[a]+=1
print(['NO','YES'][all([1 if x==1 else 0 for x in d.values()])])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

S = set(A)

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

Submission status: Accepted

Solution code:
n = int(input())
xs = list(map(int, input().split()))
ss = set()
for x in xs:
    ss.add(x)

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

Submission status: Accepted

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

N = int(readline())
print('YES' if N == len(set(map(int, readline().split()))) else 'NO')

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N = INT()
A = LIST()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import calendar
import fractions
import itertools

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

b = set(a)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

N=one_int()
A=many_int()

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

Submission status: Accepted

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

A_set = set(A_list)

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

Submission status: Accepted

Solution code:
from collections import defaultdict
N = int(input())
A = list(map(int,input().split()))
d = defaultdict(lambda:0)
ans = 'YES'
for i in range(N):
    if d[A[i]]==1:
        ans = 'NO'
    d[A[i]]=1
print(ans)

Submission status: Accepted

Solution code:

def main():
    from sys import stdin, setrecursionlimit
    #from sys import stdin, setrecursionlimit
    #setrecursionlimit(10**9)
    #n = int(stdin.readline()[:-1])   
    #r = stdin.readline()[:-1]
    #r = [stdin.readline() for i in range(n)]
    #t = [int(stdin.readline()) for i in range(n)]
    #n = int(r)
    #a = r.split()
    #a,b,c = r.split()
    #a = list(map(int, r.split()))
    #a,b,c,d = map(int, r.split())
    #a = list(map(int, r.split()))
    #a = [int(s[i]) for i in range(1, n+1)]
    #a = [list(map(int, r.split())) for i in range(1,n+1)]
    #a = [list(map(int, input().split())) for i in range(1,n+1)]
    #res = 0

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    C = collections.Counter(A)

    for i in C.keys():
        if C[i] >= 2:
            print("NO")
            break
    else:
        print("YES")


if __name__ == '__main__':
    main()

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:
from collections import defaultdict
def main():
    N = int( input())
    A = list( map( int, input().split()))
    d = defaultdict( int)
    for a in A:
        if d[a] == 1:
            print("NO")
            return
        d[a] = 1
    print("YES")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

for a,b in zip(A[:-1],A[1:]):
    if a==b:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

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