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

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

if len(nums) != len(set(nums)):
    print('NO')
else:
    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(0)

print('YES')

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
A=list(map(int, input().split()))
B=Counter(A)
if len(A)==len(B):
	print('YES')
else:
	print('NO')

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
A=list(map(int, input().split()))
B=Counter(A)
if N==len(B):
	print('YES')
else:
	print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

map = {}
has = False

for e in a:
    if e in map:
        has = True
        break
    map[e] = True

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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')
            return
    print('YES')
if __name__ == '__main__':
    main()

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

b = list(set(a))

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

Submission status: Accepted

Solution code:
U = input()
li = list(map(int, input().split()))
def has_duplicates(seq):
    return len(seq) != len(set(seq))
print('NO') if has_duplicates(li) else print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys

#S,T = stdin.readline().rstrip().split()
#A,B = [int(x) for x in stdin.readline().rstrip().split()]
N = stdin.readline().rstrip().split()
s = list(map(int,input().split()))
dict={}
for _,i in enumerate(s):
  #print( dict.get(i))
  if dict.get(i)==None:
    dict[i]=1
  else :
    print("NO")
    sys.exit(0)
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in 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:
def main():
    n = int(input())
    A = list(set(list(map(int, input().split()))))
    if len(A)==n:
        print("YES")
    else:
        print("NO")
main()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(_a) for _a in 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 = [int(_) for _ in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(int(i) for i in input().split())
A_dict ={}
ans_bool =True
for x in A:
    if x in A_dict:
        ans_bool =False
        break
    else:
        A_dict[x] =1
if ans_bool ==True:
    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:
a=int(input())
b=list(input().split())
c=sorted(b)
count=0
for i in range (a-1):
	if c[i]==c[i+1]:
		count=1
		break
	
if count==1:
	print("NO")	
else:print("YES")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
a.sort()
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())
list = [int(i) for i in input().split()]
list = set(list)

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

Submission status: Accepted

Solution code:
a=int(input())
b=list(input().split())
c=sorted(b)
ans=0
for i in range (a-1):
 if c[i]==c[i+1]:
  ans=1
  break
if ans==0:
	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 in range(N-1):
    if A[i] == A[i+1]:
        flag = False
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter

_ = map(int,input().split())
l1 = list(map(int,input().split()))

h1 = Counter()
for word in l1:
    h1[word] += 1
    
if h1.most_common()[0][1] > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 17:14:33 2020

@author: Kanaru Sato
"""

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

D = {}

for i in range(0,N):
    if A[i] not in D:
        D[A[i]] = 1
    elif A[i] in D:
        D[A[i]] += 1
        

flag = 0

for i in list(D.values()):
    if i > 1:
        flag = 1
        break
    elif i <= 1:
        continue

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if(len(set_str) == 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())
num=list(map(int,input().split()))
#print(num)
num.sort()
ans=0
for i in range(N-1):
    if num[i]==num[i+1]:
        ans=1
        break
if ans==0:
    print("YES")
if ans==1:
    print("NO")

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
n=int(input()) 
a=[int(i) for i in input().split()]
a.sort()
for i in range(len(a)-1):
    if a[i]==a[i+1]:
        print('NO')
        exit(0)
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

    count = 0
    flag = False

    set_A = set(A)

    if(len(set_A) == len(A)):
        print('YES')
    else:
        print('NO')
        
    '''
    for i in A:
        if(A.count(i) > 1):
            flag = True
            break

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

'''
    for i in A:
        for j in A:
            if(i == j):
                count += 1
            if(count > 1):
                flag = True
                break
        count = 0

        if(flag):
            break

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


D = {}

for i in range(N):
    e = A[i]
    if not(e in D):
        D[e] = 1
    else:
        D[e] = D[e] + 1

for key in D:
    if D[key]>=2:
        print("NO")
        sys.exit()
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
lst=list(map(int,input().split()))
dic_a={}
for i in range(len(lst)):
  if lst[i] not in dic_a:
    dic_a[lst[i]]=1
  else:
    print("NO")
    break
else:print("YES")

Submission status: Accepted

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

a_s = list(set(a))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

st = set()
for x in a:
    if x in st:
        print("NO")
        exit(0)
    else:
        st.add(x)

print("YES")

Submission status: Accepted

Solution code:
import numpy as np

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

A_uni = np.unique(A)
if len(A_uni) < N:
    ans = 'NO'
else:
    ans = 'YES'
print(str(ans))

Submission status: Accepted

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

flag = True

A.sort()
for i in range(1,len(A)):
    if A[i-1] == A[i]:
        flag =False
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a_lst = [int(elem) for elem in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Asett=set(Asetttt)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


n = int(input())
a = np.fromiter(map(int, input().split()), dtype=int)
if len(np.unique(a)) == len(a):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

nozoki = sorted(list(set(li)))
li.sort()
if (nozoki == li):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

nozoki = list(set(li))
nozoki.sort()
li.sort()
if (nozoki == li):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(inp):
    N = int(inp.readline().strip())
    A = map(int, inp.readline().strip().split(' '))

    A = sorted(A)
    prev = A[0]
    for a in A[1:]:
        if prev == a:
            return "NO"
        prev = a

    return "YES"


def main():
    import sys
    result = solve(sys.stdin)
    if result is not None and result != '':
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

A.sort()
f = True
for a, b in zip(A[:-1], A[1:]):
    if a==b:
        f  = False
        print('NO')
        break
if f:
    print('YES')

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:
def distinct_or_not_2(a_list):
    a_list.sort()
    for i in range(len(a_list)-1):
        if a_list[i] == a_list[i+1]:
            return 'NO'
    return 'YES'

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

print(distinct_or_not_2(a_list))

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 = [int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

INF = 1001001001

def resolve():
  n = int(input())
  a = list(map(int, input().split()))
  a.sort()
  prev = 0
  for v in a:
    if (v == prev):
      print("NO")
      return
    prev = v
  print("YES")

  return

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
p = set()
for i in a:
    if i in p:
        print('NO')
        exit()
    p.add(i)
print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

D = {}

for key in A:
    if not(key in D):
        D[key] = 1
    else:
        print("NO")
        sys.exit()
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    tmp = {}
    is_unique = True
    for i in range(n):
        if a[i] in tmp:
            is_unique = False
            break
        tmp[a[i]] = a[i]
    
    if is_unique:
        print("YES")
    else:
        print("NO")


if __name__=="__main__":
    main()

Submission status: Accepted

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

length2 = len(set(listed))

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

Submission status: Accepted

Solution code:

import numpy as np

N = int(input())
A = [int(x) for x in input().split()]
A = np.array(A)
B = np.unique(A)

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

base = len(set(num_list))

if base == num:
  ans = "YES"
elif not base == num:
  ans = "NO"

print(ans)

Submission status: Accepted

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

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

if has_duplicates(a_n):
    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(b)!=n:
  print("NO")
else:
  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())
ll = list(map(int,input().split()))
count = 0
ll.sort()


for i in range(0,n-1):
    if ll[i] == ll[i+1]:
        count += 1
    else:
        pass


if count == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
from decimal import*
from fractions import*
import math
import functools


import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines 

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
a=list(map(int, input().split()))
A=np.array(a)
def has_duplicates(seq):
    return len(seq) != len(set(seq))

s=has_duplicates(A)
if s==False:
  print("YES")
elif s==True:
  print("NO")

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
a = list(map(int, input().split()))
cnt = Counter(a)
flag = [i for i in cnt.values()]
if len(set(flag)) == 1 and max(flag) == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from collections import defaultdict
s = defaultdict(int)
n = int(input())
a = list(map(int,input().split()))
for i in a: s[i] += 1
print("YES" if max(s.values()) == 1 else "NO")

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(map(int,input().strip().split()))
if Counter(a).most_common(1)[0][1] != 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

n = int(input())
numList = [int(s) for s in input().split()]

numSet = set(numList)

if len(numList) == len(numSet):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
def DistinctOrNot(A_list):
  A_dict = {}
  for A in A_list:
    if A in A_dict:
      return 'NO'
    else:
      A_dict[A] = 1
  return 'YES'

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
length = int(input())
num_list = input().split(" ")

num_set = set(num_list)

if length == len(num_set):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import math

import numpy as np
import scipy as scp

# 入力の受け取り
n = int(input())
# 配列入力の受け取り
arrA = np.array(input().split(),dtype=np.int64)

setA = set(arrA)

if len(arrA)==len(setA):
    ans = "YES"
else:
    ans = "NO"

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
A = [int(i) for i in input().split()]
A = np.sort(A)
tf = np.any(np.diff(A) == 0)
if tf:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

tmp = set(A_list)

if len(A_list) == len(tmp):
    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('NO')
else:
  print('YES')

Submission status: Accepted

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

X.sort()
res = 'YES'
for n in range(0,N-1) :
  if X[n] == X[n+1]:
    res = 'NO'
    break

print(res)

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

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

Submission status: Accepted

Solution code:
n = int(input())
a_array = [int(x) for x in input().split()]
d = dict()
for a in a_array:
  d.setdefault(a, 0)
  d[a] += 1
  if d[a] > 1:
    break
else:
  print("YES")
  exit()
print("NO")

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
if len(set(A)) == N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

arr.sort()

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

print(ans)

Submission status: Accepted

Solution code:
# AC
N = int(input())
AAA = list(map(int, input().split()))
AAA = sorted(AAA)

last_A = None
for A in AAA:
    if A == last_A:
        print('NO')
        exit()
    last_A = A
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split())) 
a = sorted(a)
flag_diff = True
for i in range(len(a) - 1):
    if a[i] == a[i+1]:
        flag_diff = False

if flag_diff is True:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
a.sort()
for j in range(n-1):
	if a[j]<a[j+1]:
		pass
	else:
		print('NO')
		exit()
print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=input().split()
l.sort()
flag=1
for i in range(n-1):
  if l[i]==l[i+1]:flag=0
if flag==1:print("YES")
else:print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

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

Submission status: Accepted

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

Submission status: Accepted

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

b = set(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

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