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:
import sys
f = sys.stdin
N = int(f.readline()[:-1])
A = tuple(map(int, f.readline().split(' ')))
d = dict()
result = 'YES'
for a in A:
    try:
        if d[a]:
            result = 'NO'
            break
    except Exception:
        d[a] = True

print(result)

Submission status: Accepted

Solution code:
n, *seq = map(int, open(0).read().split())

seq.sort()

flag = 0

for i in range(len(seq)-1):
    if seq[i] == seq[i+1]:
        flag = 1
        break
    
if flag == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

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

if __name__=='__main__':
  main()

Submission status: Accepted

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

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:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = LIST()

# for i in range(n-1):
#     for j in range(i+1, n):
#         if a[i] == a[j]:
#             print("NO")
#             exit()
# print("YES")
if len(set(a)) != len(a):
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

c = set()

for i in range(n):
	if a[i] in c:
		print("NO")
		break
	c.add(a[i])
else:
  print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in 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()))

A_sorted=sorted(A)

ans='YES'

for i in range(N-1):
    if A_sorted[i]==A_sorted[i+1]:
        ans='NO'
        break

print(ans)

Submission status: Accepted

Solution code:
# python3
# -*- coding: utf-8 -*-
import sys
import math
#from math import gcd
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint

INF = float('inf')

ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
sys.setrecursionlimit(1000000000)


def lcm(a, b):
    return (a * b) // gcd(a, b)


# main
N = ii()
A = lmis()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = int(input())
a = list(map(str, input().split()))
n = {}
for i in a:
  n.setdefault(i, 0)
for i in a:
  n[i] += 1
x = 0
for i in n.values():
  if x <= i:
    x = i
if x == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
x = np.array(list(map(int, input().split())))
x = np.sort(x)

ans = 0
for i in range(1,N):
	if x[i] == x[i-1]:
		ans = 1

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import collections
s = int(input())
a = list(map(str, input().split()))
n = {}
for i in a:
  n.setdefault(i, 0)
for i in a:
  n[i] += 1
x = 0
for i in n.values():
  if x <= i:
    x = i
if x == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

import collections
c = collections.Counter(A)

flag = False
for k, v in c.items():
    if (v > 1):
        flag = True

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = input().split()

ans = collections.Counter(S)
for word in ans.most_common(1):
  if list(word)[1] <= 1:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Ai = list(map(int, input().split()))
Ai_set = set(Ai)
if len(Ai) - len(Ai_set) == 0:
    print('YES')

else:
    print('NO')

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
a_dict = Counter(map(int,input().split()))
if a_dict.most_common()[0][1]>1:
    ans = "NO"
else:
    ans = "YES"
print(ans)

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

N = input()
A = input()

N = int(N)
A = A.split(' ')
A = np.sort(A)

ans = 'YES'
for ii in range(N-1):
  if A[ii] == A[ii+1]:
    ans = 'NO'

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
s = set()
flag = False
for a in A:
    if a in s:
        flag = True
    else:
        s.add(a)
if flag:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
b = list(map(str, input().split()))
c = "NO"
if a[0] == 1:
	c = "NO"
elif len(b) != len(set(b)):
	c = "NO"
else: c = "YES"
print(c)

Submission status: Accepted

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

target = set(target)
target = list(target)

ans = "NO"

if len(target) == n:
    ans = "YES"

print(ans)

Submission status: Accepted

Solution code:
import sys

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

As.sort()
for i in range(N):
    for j in range(i + 1, N):
        if As[i] == As[j]:
            print('NO')
            sys.exit(0)
        if As[j] > As[i]:
            break

print('YES')

Submission status: Accepted

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

    if N == len(A):
        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()

flag = 0
for i in range(0, n - 1):
    if (a[i] == a[i+1]):
        flag = 1
        break

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

Submission status: Accepted

Solution code:
import collections
n = int(input())
a = [x for x in input().split()]
c = collections.Counter(a)
for cc in c.values():
    if int(cc) == 1:
        continue
    else:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
# coding: utf-8

import collections

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

if len(collections.Counter(a_list))==len(a_list):
    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())
numb = input().split()

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

Submission status: Accepted

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

def has_duplicates(seq):
    return len(seq) == len(set(seq))
print('YES' if has_duplicates(A) else 'NO')

Submission status: Accepted

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

A=sorted(A)
count=0
for i in range(len(A)-1):
  if A[i]==A[i+1]:
    count+=1
if count==0:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

answer = 'YES'
AA = sorted(A)
for i in range(N - 1):
    if AA[i] == AA[i + 1]:
        answer = 'NO'
        break

print(answer)

Submission status: Accepted

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

B = set()
for i in A_list:
  B.add(i)

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

Submission status: Accepted

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

b_n = sorted(a_n)
flg = 0

for i in range(n - 1):
    if b_n[i] == b_n[i + 1]:
        flg = 1

if flg == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
num = int(input())
s = input().rstrip().split(' ')
items = []
for i in range(num):
    items.append(s[i])
#print(items)

ans = set(items)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import collections
A = int(input())
k = list(map(int, input().split()))
if A == len(collections.Counter(k)):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


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


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


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


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    S, T= LS()
    A,B= LI()
    U= input().rstrip()



    if(S==U):
        print(A-1,B)
    else:
        print(A,B-1)


    
    return

# B


def B():
    A=input().rstrip()
    ans='x'
    for i in range(len(A)-1):
        ans+='x'
    print(ans)
        
    


    return

# C


def true():
    S = input()
    S = S[:-1]

    tmp = 0
    for x in range(1 << (len(S)-1)):
        func = S[-1]
        for i in range(len(S)-1):
            if(x & (1 << i)):
                tmp += int(func)
                func = S[-2-i]
            else:
                func = S[-2-i]+func
        tmp += int(func)
    print(tmp)

    return


def C():
    N = II()
    A=LI()
    AA=set(A)
    if (len(A)==len(AA)):
        print('YES')
    else:
        print('NO')
    return

        


        

# D


def D():

    H, W= LI()
    S=[]
    d=0
    for i in range(H):
        tmp=input().rstrip()
        c=0
        for j in tmp:
            if '.'==j:
                S.append(d*100+c)
            c+=1
        d+=1
    print(S)



    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':

    C()

Submission status: Accepted

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

ans = {}
for v in A:
    try:
        if ans[str(v)]:
            print("NO")
            exit()
    except KeyError:
        ans[str(v)] = True

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:
num = int(input())
s = input().split()
t = list(set(s))
if num == len(t):
  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.sort()

ok = True
olda = 0
for a in A:
    if olda == a:
        ok = False
        break
    else:
        olda = a
if ok :
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

c = set(b)

ans = 'YES'

if len(c) != len(b):
    ans = 'NO'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

a_f = list(set(a))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def has_duplicates(seq):
    if len(seq) != len(set(seq)):
        return 'NO'
    else:
        return 'YES'

print(has_duplicates(integers))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def main(list_A):

    list_A = sorted(list_A)
    prev_A = 0
    for A in list_A:
        if A == prev_A:
            return "NO"
        else:
            prev_A = A
    else: return "YES"


if __name__ == "__main__":

    N      = int(input())
    list_A = list(map(int, input().split(' ')))

    answer = main(list_A)
    print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(len(list)):
  n=list[i]
  if(c[n]!=1):
    print("NO")
    break
  elif(i==len(list)-1):
    print("YES")

Submission status: Accepted

Solution code:
import sys
# 整数を一つ入力
N = int(input())
# スペース区切りの整数をリストに入力
a = [int(x) for x in input().split()]

abox = {}

for i in a:
    if i in abox:
        print("NO")
        sys.exit()
    else:
        abox[i] = 1

print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
x = [int(x) for x in input().split()]
if sorted(x) == sorted(list(set(x))):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
A = read_int()

m = defaultdict(lambda: int())
def solve():
    for a in A:
        if m[a] != 0:
            return 'NO'
        else:
            m[a] += 1
    return 'YES'

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

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:
input()
input_line = [i for i in input().split(" ")]

input_set = set(input_line)

if len(input_line) == len(input_set):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:

input()
a = [int(i) for i in input().split(' ')]
b = list(set(a))

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

Submission status: Accepted

Solution code:
import sys
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=list(map(int,input().split()))
b_list=sorted(a_list)
b_list.append("a")
ans=0
for i in range(N):
    if b_list[i]==b_list[i+1]:
        ans=+1
if ans==0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:

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

def onlya(n , a):

    ans = "YES"

#    for i in range(n):
#        for w in range(i + 1 , n):
#            if a[i] == a[w]:
#                return "NO"

    if has_duplicates(a):
        return "NO"

    return ans

def main():
    n = int(input())
    a = list(map(int,input().split()))
    print(onlya(n , a))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a = input().split(" ")

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
args0 = input()
args = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
seq = list(map(int,input().split()))
ans = "YES"

seq.sort()

for i in range(N-1):
    if seq[i] == seq[i+1]:
        ans = "NO"
        break


print(ans)

Submission status: Accepted

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


yn = 'YNEOS'
ynflg = False
cnt = 0
ans = None

def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas



N = intinput()
datas = set(mulinputs())
# datas = list(range(1000000000))

# last = len(datas) - 1
# for i in range(len(datas)>>1):
#     print(i, datas[i], datas[last-i], ynflg)
#     if datas[i] != datas[last-i]:
#         continue
#     ynflg = True
ynflg = not(len(datas) == N)

# 出力
print(yn[ynflg::2])

Submission status: Accepted

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

if len(c) == 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:
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

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


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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
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())
li = list(map(int,input().split()))	
num = {}
for l in li:
    if str(l) not in num :
        num[str(l)] = 1
    elif num[str(l)]==1:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

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

a1 = len(A)

B = set(A)

b1 = len(B)

if a1 == b1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
LL = L.sort()

Flag = True
for i in range(N-1):
    if L[i] == L[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()))
import collections
a_c = collections.Counter(a)
if sum(a_c.values()) == len(a_c.values()):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import math
import itertools
n = int(input())
#n, d = list(input().split())
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())
p = list(map(int, input().split()))
q = set(p)
if len(p) == len(q):
    print('YES')
else: print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int, input().split()))
c = set(b)

if len(b) != len(c):
    print('NO')
else:
    print('YES')

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    N = input()
    A = list(map(int, input().split()))
    if(has_duplicates(A)==True):#重複アリ
        print("NO")
    elif(has_duplicates(A)==False):#重複ナシ
        print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
from operator import itemgetter

N = int(input())
A = Counter(map(int,input().split()))
A1 = list(A.items())
A1 = sorted(A1,key=itemgetter(1),reverse = True)
#print(A1)

if A1[0][1] == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

import collections
c = collections.Counter(a)

flag = True
for i in c.values():
    #print(i)
    if i!=1:
        flag = False
        break
if flag == False:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
t = 1
num = int(input())
num_list = input().split(" ")

new_list = sorted(num_list)
for i in range(num):
  try:
    if new_list[i]==new_list[i+1]:
      print("NO")
      t = 0
      break
    else:
      pass
  except:
    pass

    
if t == 1:
	print("YES")

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

B = list(set(A))

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
n = list(map(int, input().split()))
c = collections.Counter(n)

cnt = c.most_common()

for c in cnt:
  if (c[1]>1):
  	print('NO')
  else:
    print('YES')
  break

Submission status: Accepted

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

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

Submission status: Accepted

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


N = int(input())
A = [int(i) for i in input().split()]
print("NO" if has_duplicates(A) else "YES")

Submission status: Accepted

Solution code:
s = set()
n = input()
for i in map(int,input().split()):
  if i in s:
    print("NO")
    exit(0)
  else:
    s.add(i)
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = np.array(list(map(int,input().split())))

if len(np.unique(a)) == len(a):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
length = int(input())

array = set(input().split())

print("YES" if len(array) == length else "NO")