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

if N1 == N2:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

b = set(a)

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

Submission status: Accepted

Solution code:
l = int(input())
num_lis = list(input().split())
ans = 'YES'
for i in range(l):
    num_lis[i] = int(num_lis[i])
num_lis = sorted(num_lis)
for i in range(l-1):
    if num_lis[i] == num_lis[i+1]:
        ans = 'NO'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
A.sort()
f = 0

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

if f==0:
    print("YES")

Submission status: Accepted

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

def check(seq):
    if len(seq) != len(set(seq)):
        return "NO"
    else:
        return "YES"

print(check(A))

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

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

ii = len(An)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def areDistinct(arr) : 
  
    n = len(arr) 
    s = set() 
    for i in range(0, n):  
        s.add(arr[i]) 
    return (len(s) == len(arr)) 
N = int(input())
S =  [int(x) for x in input().split()]
  
if (areDistinct(S)):  
    print("YES") 
  
else :  
    print("NO")

Submission status: Accepted

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

count=True

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve(n, a):
    a.sort()
    for i in range(n - 1):
        if(a[i] == a[i + 1]):
            return 'NO'

    return 'YES'

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

print(solve(n, a))

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 = input().split()
A.sort()
frag = None
for i in range(N-1):
  if A[i] ==A[i+1]:
    print('NO')
    frag = 1
    break
if frag == None:
  print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = sorted(input().split(),reverse=True)

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

NumArr = [int(num) for num in input().split()]

flg = len(NumArr) == len(set(NumArr))

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

Submission status: Accepted

Solution code:
a=int(input())
list_a = [int(x) for x in input().split()]
set_a = set(list_a)
list_b = list(set_a)

list_a.sort()
list_b.sort()
if list_a == list_b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
'''
Author:Fuad Ashraful Mehmet
University of Asia Pacific
Date:09 Feb 2020
'''

class Distinct:

    def __init__(self,n):
        self.n=n
        self.numbers=list(map(int,input().split()))
    
    def solve(self):
        if len(set(self.numbers))==self.n:
            return "YES"
        return "NO"

obj=Distinct(int(input()))

print(obj.solve())

Submission status: Accepted

Solution code:
#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
#どっかで最悪計算量の入力データを用意する関数を作ろう？
def worstdata():
    a=0
    return a
#solution:
def comp(p):#期待値
    return ((p+1)/2)



#input
n,=(pin())
S=sorted(list(pin()))
cond=1
for i in range(1,n):
    if S[i]-S[i-1]==0:
        cond=0
        break

print(["NO","YES"][cond])

Submission status: Accepted

Solution code:
N=input()
A=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=[i for i in map(int, input().split())]

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

Submission status: Accepted

Solution code:
def eq(seq):
    return len(seq) != len(set(seq))
n = int(input())
i = list(map(int,input().split()))
if eq(i):
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:


if __name__ == "__main__":
    U = input()
    A = input().split()

    A_uni = set(A)

    if len(A) != len(A_uni):
        ret  = "NO"
    else:
        ret = "YES"

    print(ret)

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 = input()
a = input().split()

def has_duplicates(seq):
    return len(seq) != len(set(seq))
  
b = has_duplicates(a)
if b == True:
  print('NO')
if b == False:
  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:
def has_duplicates(seq):
    return len(seq) != len(set(seq))

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

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

Submission status: Accepted

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

Set_A = set(A)

if len(Set_A) == len(A):
    print('YES')

else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
dic = {}
j = True

for i in range(0, len(A)):
  if str(A[i]) in dic:
    print("NO")
    j = False
    break
  else:
    dic.setdefault(str(A[i]), A[i])

if j:
  print("YES")

Submission status: Accepted

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

Ai.sort()

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

Submission status: Accepted

Solution code:
a=int(input())
b=[int(i) for i in input().split()]
c=list(set(b))
if len(b)==len(c):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

if(has(A)):
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
m = 0
i = 0
while True:
    if a[i] == a[i + 1]:
        m = 1
        break
    elif i == n - 2:
        break
    i += 1
if m == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

answer = 'YES'
check_dic = {}
for a in A:
    if a in check_dic:
        answer = 'NO'
        break
    else:
        check_dic[a] = True
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
List = [i for i in input().split(" ")]
Dict = {}
flag=0
for i in range(N):
    try:
        Dict[List[i]] += 1
    except KeyError:
        Dict[List[i]] = 1
        
list2 = list(Dict.values())
for j in range(len(list2)):
    if list2[j]>1:
        flag=1
if flag==1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
S = input()
A = list(map(int, input().split()))
A.sort()
Y=0
Z=0
while Z < int(S)-1:
  if int(A[Z]) - int(A[Z+1]) == 0:
    print("NO")
    Y=1
    break
  else:
    Z = Z+1
    continue
if not Y ==1:
  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())
i = list(map(int, input().split()))

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

print(has_duplicates(i))

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 solve():
    N = int(input())
    array = sorted(map(int, input().split()))
    for index in range(1, N):
        if array[index] == array[index - 1]:
            print("NO")
            return
    print("YES")
solve()

Submission status: Accepted

Solution code:
input()
l = input().split()
d = set(l)
print('YES' if len(l) == len(d) else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict as d
n = int(input())
a = list(map(int,input().split()))
m1 = d(int)
for i in a:
  m1[i]+=1

#print(m1)
flag=0
for i in m1.values():
  if i >1:
    print("NO")
    flag=1
    break

if flag==0:
  print("YES")

Submission status: Accepted

Solution code:
n = 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 = input().strip()
Arr = input().strip().split(' ')
if len(Arr) - len(set(Arr)) == 0:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = input().split()
if len(set(b)) != len(b):
	print('NO')
else:
	print('YES')

Submission status: Accepted

Solution code:
first_int = int(input())
secound_list = [int(k) for k in input().split()]

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

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

Submission status: Accepted

Solution code:
#At coder 2020/2/9 B

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

if len(A)-len(set(A))==0:
    ans='YES'
else:
    ans='NO'
#ans='YES'
#for ii in range(N-1):
#    for jj in range(ii+1,N):
#        if A[ii]==A[jj]:
#            ans='NO'
#            break
#    if ans=='NO':
#        break


print(ans)

Submission status: Accepted

Solution code:
N = input()
A = input().split()
A = [int(l) for l in A]
A = sorted(A)
m = len(A)
T = "YES"
for i in range(m-1):
  if A[i] == A[i+1]:
    T = "NO"
    break
print(T)

Submission status: Accepted

Solution code:
def main():
    N = input()
    A_raw = input().split(' ')
    A_n = []
    for i in A_raw:
        A_n.append(int(i))
    
    A_n.sort()
    
    for i in range(len(A_n)):
        if i == len(A_n)-1:
            print('YES')
        elif A_n[i] == A_n[i+1]:
            print('NO')
            return 0
    return 0

main()

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

nums = tuple(map(int, input().split()))

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

Submission status: Accepted

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

a.sort()

if any([a1==a2 for a1,a2 in zip(a[:-1], a[1:])]):
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(A)

ans = all([True if v == 1 else False for k, v in c.items()])

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

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 = input().split()
s = set()

dup = False
for i in a:
    if i in s:
        dup = True
    else:
        s.add(i)

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

Submission status: Accepted

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

A_line.sort()

res = "YES"
for i in range(len(A_line) - 1):
  if A_line[i] == A_line[i + 1]:
    res = "NO"

print(res)

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
length = int(input())
numArr = [int(str_num) for str_num in input().split(' ')]

numArr.sort()

def judge():
  for i in range(0, length - 1):
    if numArr[i] == numArr[i + 1]:
      print("NO")
      return False
  return True

if(judge()):
	print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in range(n-1):
    if a[i] == a[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()))

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

if f == True:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in 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:
s = int(input())
l = [int(n) for n in input().split()]
l = sorted(l)
flag = 0

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

Submission status: Accepted

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

li0 = sorted(li)

j = 0
for i in range(n):
  if li0[i-1]==li0[i]:
    j = 1

if j == 0:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

if C:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b.sort()

for i in range(int(a)-1):
    if b[i] == b[i+1]:
        print("NO")
        break
    else:
        if i == int(a)-2:
            print("YES")

Submission status: Accepted

Solution code:
print('YNEOS'[int(input())!=len(set(input().split()))::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

B = set(A)

print('YES' if len(A)==len(B) 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]"):
    sortA = sorted(A)
    ans = YES
    for n, e in enumerate(sortA):
        if n != len(sortA)-1 and e == sortA[n+1]:
            ans = NO
            break
    print(ans)
    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()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
Bool = len(numbers) != len(set(numbers))

if Bool == True:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

ans = 0

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

if ans == 0:
  print('YES')
elif ans ==1:
  print('NO')

Submission status: Accepted

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

A.sort()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    vals = list(map(int, input().split()))
    flg = 0

    vals.sort()
    for i in range(n-1):
        if vals[i] == vals[i + 1]:
            flg += 1
            break
    if flg == 0:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

Solution code:


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


flag = True
for i in range(N-1):
    target = A_list_sorted[i]

    if target == A_list_sorted[i+1]:
        flag = False
        break

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
def test(A):
    return len(A)!= len(set(A))
if test(A)==False:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

import sys

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

b = set()
for a in A:
    if a in b:
        print('NO')
        sys.exit()
    else:
        b.add(a)

print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = input()
A = sorted(map(int, input().split()))
for (i,num) in enumerate(A):
  # 最後だったらbreak
  if i == len(A) - 1:
    break
  if num == A[i+1]:
    print('NO')
    sys.exit()
print('YES')

Submission status: Accepted

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

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

print(judge)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Distinct or Not

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

d = {}
for i in a:
	if i in d:
		print("NO")
		exit()
	d[i] = i

print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
A = list(map(int,input().split()))
n = len(list(A))
m = len(set(A))
if n == m:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
f = 0
A.sort()
for i in range(len(A)):
    if i != len(A)-1:
        if A[i] == A[i+1]:
            f = 1
            break
        
if f > 0:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

count = 0
list00 = sorted(a)
for i in range(1, n):
  if list00[i-1] == list00[i]:
    count = count*0
  else:
    count = count + 1

if count == n-1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
all_num = int(input())
num_list = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

distinct = True
for i in a:
    if i in m:
        distinct = False
        break
    m[i] = 1
    
if distinct:
    print("YES")
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys

n = int(input())
a = input().split()
a = sorted(a)

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

Submission status: Accepted

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

myset = set(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int,input().split()))

a.sort()

#print(a)

ret = False
for i in range(n-1):
        #print(i)
        #print(a[i] == a[i+1])
        ret += (a[i] == a[i+1])

print('YES' if ret == 0 else 'NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
low = int(input())
arrow = list(map(int, input().split()))

arrow1 = sorted(arrow)
arrow2 = sorted(arrow, reverse=True)
res = "YES"

for i in range(int(low/2)):
  if arrow1[i] == arrow1[i+1]:
    res = "NO"
    break

if res == "NO":
  print(res)
else:
  for i in range(int(low/2)):
    if arrow2[i] == arrow2[i+1]:
      res = "NO"
      break
    
  print(res)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().strip().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:
input();l=list(map(int,input().split()))
print("YNEOS"[len(l)!=len(set(l))::2])

Submission status: Accepted

Solution code:
n = int(input())
num = list(map(int, input().split()))
num.sort()
det = 0
for i in range(n-1):
    if num[i] == num[i+1]:
        det += 1
    else:
        pass

if det != 0:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc154/tasks/abc154_c
# -*- coding: utf-8 -*-
N = int(input())
A = [int(i) for i in input().split()]
A.sort()
for i in range(1,N):
  if A[i] == A[i-1]:
    ans = "NO"
    break
  else:
    ans = "YES"
print(ans)

Submission status: Accepted

Solution code:
def areDistinct(arr) : 
  
    n = len(arr) 
  
    # Put all array elements in a map 
    s = set() 
    for i in range(0, n):  
        s.add(arr[i]) 
      
    # If all elements are distinct,  
    # size of set should be same array. 
    return (len(s) == len(arr)) 
  
# Driver code 
N = int(input())
S =  [int(x) for x in input().split()]
  
if (areDistinct(S)):  
    print("YES") 
  
else :  
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())
A = {int(i) for i in input().split()}
if N == len(A):
    print('YES')
else:
    print('NO')