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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print("YES" if n == len(set(map(int, input().split()))) else "NO")
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(N-1):
    if A[i]!=A[i+1]:
        ans+=1
    else:
        break

if ans+1==N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

A_C=Counter(A)

flag=True
for i,v in A_C.items():
    if v!=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()))
m=set(l)
if len(l)==len(m):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
A2=set(A)
LEN1=len(A)
LEN2=len(A2)
if LEN1==LEN2:
  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()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

l = input().split()

L = set(l)

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

Submission status: Accepted

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

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

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

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(input().split())
l=len(list(set(a)))
if l==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'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import queue
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1

n = readInt()
a = readInts()
a.sort()

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

Submission status: Accepted

Solution code:
#154c
n = int(input())
a = list(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()
a = nl()

s = set()

for ai in a:
  s.add(ai)

if len(s) == n:
  print('YES')
  exit()
print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
a_unique = list(set(a))

ans = "NO"
if len(a) == len(a_unique):
  ans = "YES"
print(ans)

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

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
from collections import defaultdict

def main():
    n = int(sys.stdin.readline())
    A = list(map(int,sys.stdin.readline().split()))
    num_dict = {}
    flag = True
    for x in A:
        if not x-1 in num_dict:
            num_dict[x-1] = x-1
        else:
            flag = False
            break
    print("YES") if flag else print("NO")
    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import Counter

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

counter = Counter(A)
if max(counter.values()) == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

a.sort()
isBad = False
pre = -1
for i in range(n):
    if(pre==a[i]):
        isBad=True
        break
    pre = a[i]


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

Submission status: Accepted

Solution code:
import collections
n = int(raw_input())
def f(elems):
	seen = set([])
	for el in elems:
		el = int(el)
		if el in seen: return False
		seen.add(el)
	return True

print 'YES' if f(raw_input().split(' ')) 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:
_ = int(input())
A = list(map(int, input().split()))

import collections
c = collections.Counter(A)

if max(c.values()) > 1:
    print("NO") 
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:
N=int(input())
h={}
A=list(map(int, input().split()))

for i in range(len(A)):
  value=A[i]

  if value in h:
    h[value] += 1
  else:
    h[value] = 1
  if h[value] > 1:
    print('NO')
    exit(0)
print('YES')

Submission status: Accepted

Solution code:
import sys

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

A.sort()

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

Submission status: Accepted

Solution code:
import sys

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

dic = {}

for i in range(n):
    if A[i] not in dic:
        dic[A[i]] = 1
    else:
        print('NO')
        sys.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")
        break
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:
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:
import sys
from io import StringIO
import unittest


def resolve():
    int(input())
    A = [int(i) for i in input().split()]
    Aa = set(A)
    if len(A) == len(Aa):
        print("YES")
    else:
        print("NO")


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """5
2 6 1 4 5"""
        output = """YES"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """6
4 1 3 1 6 2"""
        output = """NO"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """2
10000000 10000000"""
        output = """NO"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

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 numpy as np
def f(n, a):
    if len(np.unique(a)) == n:
        print('YES')
    else:
        print('NO')

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

f(n, a)

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:
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


n = inp()
a = inpl()
a_ = set(a)
if len(a) == len(a_):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
d = {}
for i in l:
    if i in d:
        d[i] += 1
    if i not in d:
        d[i] = 1
length = len(d)
if length ==n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

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


def main():
    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")
            exit()
    print("YES")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
n=int(input())
x=list(map(int,input().split()))
a=defaultdict(int)
f=True
 
for y in x:
    if a[y]==1:
        f=False
        break
    a[y]=1
    
if f:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

result = True

a.sort()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
s = set()
for i in range(n):
    s.add(a[i])

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

Submission status: Accepted

Solution code:

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

import collections
"""
l = ['a', 'a', 'a', 'a', 'b', 'c', 'c']
c = collections.Counter(l)
print(c) # {'a': 4, 'c': 2, 'b': 1}
print(c['a']) # 4
print(len(c)) # 3
print(list(c.keys())) # ['a', 'b', 'c']
print(list(c.values())) # [4, 1, 2]
print(list(c.items())) # [('a', 4), ('b', 1), ('c', 2)]
"""

c = collections.Counter(a)
if len(c)==len(a):
    print('YES')

else:print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if has_duplicates(List)!=True:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())

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

B = set(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
data = [int(i) for i in input().split()]
D = sorted(data)
for j in range(N - 1):
    if D[j] == D[j + 1]:
        print("NO")
        break
    else:
        continue
else:
    print("YES")

Submission status: Accepted

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

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(str, input().split()))
dic = {}
for i in range(N):
    if A[i] not in dic:
        dic[A[i]] = 1
    else:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(raw_input())
l = sorted([int(x) for x in raw_input().split()])
ret = "YES"
i = 0
while i + 1 < n:
    if l[i] == l[i+1]:
        ret = "NO"
    i += 1
print ret

Submission status: Accepted

Solution code:
count = int(input())
line = []
n = set(input().split())
if len(n) == count:
    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:
t = int(input())

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

y = set(x)

if len(x)!=len(y):
    print("NO")
    
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

import collections
c = collections.Counter(A)

if max(c.values()) > 1:
    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 itertools
import math
import fractions
import functools
n = int(input())
a = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.readline
read = sys.stdin.read
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
#import math
#from itertools import combinations
#import bisect# lower_bound etc
#import numpy as np
def run():
    N = int(input())
    A = list(map(int, sysread().split()))
    A = sorted(A)
    for i in range(N-1):
        if A[i] == A[i+1]:
            print('NO')
            return None
    print('YES')


if __name__ == "__main__":
    run()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A.sort()
count = 0

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

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

Submission status: Accepted

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

for i in range(len(num_list)):
  if i == N-1:
    print('YES')
  elif num_list[i] == num_list[i+1]:
    print('NO')
    exit()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May  8 14:22:50 2020

@author: shinba
"""
from collections import Counter

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

ans = Counter(X)

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

Submission status: Accepted

Solution code:
from collections import Counter

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

if [1] * N == list(Counter(A).values()):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
S=int(input())
T = input().split()
U = [int(i) for i in T]
U.sort()
r = 0

for i in range(S-1):
  if(U[i] == U[i+1]):
    r+=1
    
if(r==0):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

A.sort()

previous = 0
for a in A:
    if a == previous:
        print("NO")
        sys.exit(0)
    previous = a
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import collections
cnt = list(collections.Counter(a_))

print('YES' if len(cnt) == n else 'NO')

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    A = set(input().split())
    
    a = len(A)
    if a == N:
        print("YES")
    elif a != N:
        print("NO")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    n = int(stdin.readline())
    a = list(map(int, stdin.readline().split()))

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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

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

for i in a.values():
    if i >= 2:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if len(A)==len(B):
  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).most_common()

for i in range(len(c)):
  if c[i][1]>1:
    print("NO")
    exit()

print("YES")

Submission status: Accepted

Solution code:
Num = int(input())
num_list =list(map(int,input().split()))
set_list = list(set(num_list))
if len(num_list)-len(set_list) > 0:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

fl = True

for i in range(1,n):
    if a[i-1] == a[i]:
        fl = False

if fl:
    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= list(map(int,input().split()))
dic={}
b=0
for i in A:
 if i in dic:
  b+=1
 else:
  dic[i]=1 
if b==0:
 print("YES")
else:
 print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
list1 = sorted(list(map(int, input().split())))
pre_num = None
s = 'YES'
for num in list1:
  if num == pre_num:
    s = 'NO'
    break
  pre_num = num
print(s)

Submission status: Accepted

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

a_dict = collections.Counter(A)
for v in a_dict.values():
    if v >= 2:
        print("NO")
        sys.exit(0)
        
else:
    print("YES")

Submission status: Accepted

Solution code:
# C - Distinct or Not

N = int(input())
A = [int(a) for a in input().split()]
B = set(A)
print('YES' if len(A) == len(B) else 'NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
def readstr():return readline().rstrip().decode()
def readstrs():return list(readline().decode().split())
def readint():return int(readline())
def readints():return list(map(int,readline().split()))
def printrows(x):print('\n'.join(map(str,x)))


n = readint()
a = readints()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
a_hash = {}
for a in a_list:
    if a in a_hash:
        print("NO")
        exit()
    a_hash[a] = True
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:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

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

Submission status: Accepted

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

Submission status: Accepted

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