Problem:


Score : 300 points

Problem Statement

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

Constraints

2 ≤ N ≤ 200000

1 ≤ A_i ≤ 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

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

Sample Input 1

5
2 6 1 4 5

Sample Output 1

YES

The elements are pairwise distinct.

Sample Input 2

6
4 1 3 1 6 2

Sample Output 2

NO

The second and fourth elements are identical.

Sample Input 3

2
10000000 10000000

Sample Output 3

NO



Sample input:
5
2 6 1 4 5


Sample output:
YES

Submission status: Accepted

Solution code:

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

A = sorted(A)

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

Submission status: Accepted

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

d={}
for i in A:
  d.setdefault(i, 0)
  d[i]+=1

flag='YES'
for m in d.values():
  if m >= 2:
    flag='NO'
print(flag)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if has_duplicates(mylist)==True:
    #重複あり
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
import collections

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

C=collections.Counter(A)

for i in C.values():
    if i>1:
        print("NO")
        exit()
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:
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())
A=[int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a_list = [int(i) for i in input().split()]

a_list = np.array(a_list)

unique_num = np.unique(a_list).shape[0]

if n == unique_num:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    n = int(input())
    l = list(map(int, input().split()))
    l.sort()

    for i in range(len(l)-1):
        if l[i] == l[i+1]:
            print("NO")
            return
    
    print("YES")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(N: int, A: "List[int]"):
    print(YES if len(set(A))==len(A) else NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
x = list(map(int, input().split()))
x_so=sorted(x)
kotae="YES"
for i in range(N-1):
    if x_so[i+1]<=x_so[i]:
        kotae="NO"
print(kotae)

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()))
ans="YES"
a.sort()
mae=0
for i in a:
  if i==mae:
    ans="NO"
    break
  else:
    mae=i
print(ans)

Submission status: Accepted

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

c = collections.Counter(l)
if c.most_common()[0][1] > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
_ = input()
A = input().split()
AA = set(A)

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

Submission status: Accepted

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

unique = len(list(set(c)))
org = len(c)
if unique == org:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = sorted(A)
def sameornot(B):
    for i in range(0,len(B)-1):
        if B[i] == B[i+1]:
            return 'NO'
    return 'YES'
print(sameornot(B))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

s = set()
ans = True
for i in a:
  if i in s:
    ans = False
    break
  s.add(i)

if ans:
  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())
s=input().split()
t=set(s)
if len(s)==len(t):print('YES')
else:print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3.4
# -*- coding: utf-8 -*-
# abc154/abc154_c
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    A = i2nn()
    S = set(A)
    print('YES' if len(A) == len(S) else 'NO')
    return

main()

Submission status: Accepted

Solution code:
import heapq

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

print(("NO","YES")[len(set(A))==N])

Submission status: Accepted

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

ans = {}
a = list(map(int, input().split()))
flag = True
for i in range(n):
  if a[i] in ans:
    flag = False
    break
  else:
    ans[a[i]] = 1
    
if flag:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = input()
nums = list(input().split(' '))
if len(nums) != len(set(nums)):
    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("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

nList = sorted(list(map(int,input().split())))

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

print("YES")

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 154: C (2020/02/09)
N = int(input())
l = input().split()
A = [0 for i in range(N)]
for i in range(N):
    A[i] = int(l[i])
B = list(set(A))
if len(A) == len(B):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import collections
n = int(input())
a_lis = list(map(int, input().split()))
a_cnt = collections.Counter(a_lis)
for v in a_cnt.values():
    if v >= 2:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
#cotest_temp
n = int(input())
#n,m = map(int,input().split())
lst1 = list(map(int,input().split()))

dic1 = dict()

for i in lst1:
    if i in dic1:
        print("NO")
        exit()
    else:
        dic1[i] = 1

print("YES")

Submission status: Accepted

Solution code:
import collections

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

Submission status: Accepted

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

S = set(A)

print('YES' if len(A) == len(S) else 'NO')

Submission status: Accepted

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

dic = {}

for i in a:
    if i not in dic.keys():
        dic[i] = 1
    else:
        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 = input()
a = list(map(int,input().split()))

uniq_array = list(set(a))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

m=10**9 + 7 
sys.setrecursionlimit(1000010)
N=int(input())
A  = list(map(int,input().split()))

# print(A)
dictA={}

for i in A:
    if i in dictA: 
        print("NO")
        exit(0)
    dictA[i]=1
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
.append(要素) リストに要素を追加 
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
import itertools
from functools import reduce
from operator import mul

N = int(stdin.readline().rstrip())
nums = [int(s) for s in stdin.readline().rstrip().split()]
nums.sort()
check = True
for el in range(N):
    if el == N - 1:
        break
    if nums[el] == nums[el + 1]:
        print('NO')
        check = False
        break
if check:
    print('YES')

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

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
A=list(input().split())

c=Counter(A)

v=list(c.values())



def map_all(es):
    return all([e == es[0] for e in es[1:]]) if es else False
ans=map_all(v)

if v[0]==1 and ans==True:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

def solve(n, a):
    exists = set()
    for a_i in a:
        if a_i in exists:
            return "NO"
        exists.add(a_i)
    return "YES"

if __name__ == '__main__':
    n = sys.stdin.readline().strip()
    a = list(map(int,sys.stdin.readline().strip().split(" ")))
    
    print(solve(n, a))

Submission status: Accepted

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

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(N: int, A: "List[int]"):
    if len(set(A))==len(A):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
A=sorted(list(map(int,input().split())))
 
bef=A[0]
for i in range(1,n):
       if A[i]==bef:
              print("NO")
              exit()
       bef=A[i]
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
is_yes = True
a_m = {}
for a_i in a:
  if a_i in a_m:
    is_yes = False
    break
  a_m[a_i]=True
if is_yes:
  print("YES")
else:
  print("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().split()[0])
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Feb  9 20:52:55 2020

@author: H_Hoshigi
"""

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

A_list.sort()
A_now = 0
answer = "YES"
for i in A_list:
    if i == A_now:
        answer = "NO"
        break
    else:
        A_now = i

print(answer)

Submission status: Accepted

Solution code:

n = int(input())
l = list(map(int,input().split()))
#print(l)
a = len(set(l))
#print(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

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

A.sort()

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split());print('YNEOS'[len(a)!=len(set(a))::2])

Submission status: Accepted

Solution code:
import sys
n = int(input())

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

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

print('YES')

Submission status: Accepted

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

a_s = set(a)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

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

def main():
    N = int(input())
    As = map(int, input().split())

    seen = set()
    for A in As:
        if A in seen:
            print("NO")
            return
        seen.add(A)

    print("YES")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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


def main():
    already = set([])

    for a in A:
        if a not in already:
            already.add(a)
        else:
            return "NO"

    return "YES"


print(main())

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


def fetch_ints_inputs(times):
    return [fetch_int_input() for _ in range(times)]



fetch_one_line()
nums = fetch_int_input()

set_nums = set(nums)

answer = ["NO", "YES"]

print(answer[int(len(nums) == len(set_nums))])

Submission status: Accepted

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


def main():
    n = int(input())
    if has_duplicates(list(map(int, input().split(' ')))):
        print('NO')
    else:
        print('YES')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

is_ok = True
for i in range(len(a)):
    num = a[i]
    if num in num_hash:
        print('NO')
        is_ok = False
        break
    num_hash[num] = True
if is_ok:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

used_dict = {}
for i,a in enumerate(a_list):
    if a in used_dict:
        print('NO')
        sys.exit()
    else:
        used_dict[a] = True

print('YES')

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    As = input().split(" ")
    len_As = len(As)
    len_setAs = len(set(As))
    if len_As == len_setAs:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
a = list(map(int, input().split()))
d = {}
for i in a:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
ans = "YES"
for i in d.values():
    if i > 1:
        ans = "NO"

print(ans)

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:
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(N: int, A: "List[int]"):
    if N == len(set(A)):
        print("YES")
    else:
        print("NO")
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

setlist = len(set(numlist))

if N == setlist:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline())
A = list(map(int,stdin.readline().split()))
K = {}
ans = "YES"
for i in A:
	if i in K:
		ans = "NO"
		break
	else:
		K[i] = 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

Solution code:
n = int(input())
m = len(set(input().split()))
print(["NO","YES"][n==m])

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:
def main():
    N = int(input())
    A = list(map(int, input().split(" ")))
    A.sort()
    answer = "YES"
    for i in range(N - 1):
        if A[i] == A[i + 1]:
            answer = "NO"
            break
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

A.sort()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, *D  = [list(map(int, s.split())) for s in open(0)]
n, D =  n[0], D[0]
if n == len(set(D)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

A_uniq = len(set(A))

if N==A_uniq:
  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)
c = c.most_common()
if c[0][1] == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input().rstrip())
As = map(int, input().rstrip().split(" "))

history = {}

result = True

for a in As:
    if history.get(a) is not None:
        result = False
        break
    history[a] = True

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

Submission status: Accepted

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

A_sort = sorted(A)
#print(A_sort)

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

Submission status: Accepted

Solution code:
import sys

N = int(input())
AList = list(map(int, input().split()))
AList.sort()

for i in range(1, N):
    if AList[i - 1] == AList[i]:
        print('NO')
        sys.exit()
        
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A = list(map(int,input().split()))
res = 'YES'
A = sorted(A)

for i in range(1,len(A)):
    if A[i-1] == A[i]:
        res = 'NO'

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
import numpy as np
from collections import deque
from itertools import combinations
sys.setrecursionlimit(10**9)


def main():
    N = input()
    A_sorted = sorted(list(map(int, input().split())))

    result = True
    previous = -1
    for a in A_sorted:
        if previous == a:
            result = False
            break
        previous = a

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


if __name__ == "__main__":
  main()

Submission status: Accepted

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

al = len(a)
asl = len(set(a))

if al == asl:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

l = list(A)
s = set(l)

if len(l) == len(s):
    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)!=len(a):
  print('NO')
else:
  print('YES')

Submission status: Accepted

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

set_list = set(a_list)

if len(a_list) == len(set_list):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A

def solve(N, A):
    A = sorted(A)
    is_different = True
    for i in range(1, N):
        if A[i-1] == A[i]:
            is_different = False
    return 'YES' if is_different else 'NO'


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

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:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    A = sorted(A)
    prev = A[0]
    for i in range(1, N):
        if prev == A[i]:
            print("NO")
            return 0
        else:
            prev = A[i]
    print("YES")

    return 0

if __name__ == '__main__':
    main()

Submission status: Accepted

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