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 = [int(x) for x in input().split()]
A.sort()
for i in range(len(A)-1):
  if A[i]==A[i+1]:
    print("NO")
    exit()
print("YES")

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:
def duplication(lis):
    return len(lis) == len(set(lis)) 

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


if duplication(An) == True:
    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("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter

N = int(input())
A = list(map(int, input().split()))
C = Counter(A)
ok = True
for v in C.values():
    if v != 1:
        ok = False
        break
print("YES" if ok 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=input()
A=input()
A_list=A.split(' ')
A_list.sort()
judge=0
for i in range(int(N)-1):
  if A_list[i]==A_list[i+1]:
    judge+=1
if judge==0:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(a) for a in input().split()]
a.sort()
flag = True
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:
x = int(input(""))
l = list()
flag = 0
arr = [int(x) for x in input().split()]
arr2=set(arr)
l=len(arr)
l2=len(arr2)
if l!=l2:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

def main():

    # sys.stdin = open('input154c.txt')

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np

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")
			exit(0)
	
	print("YES")
	
	
if __name__ == "__main__":
	main()

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]"):
    p = sorted(A)
    for i in range(0,N-1):
        if (p[i] == p[i+1]):
            print(NO)
            return

    print(YES)


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

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

Submission status: Accepted

Solution code:
import collections
n = int(input())
A = [int(i) for i in input().split()]
ans = collections.Counter(A)
ans = list(ans)
if len(ans)==n:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a_lst = list(map(int,input().split()))
new_lst = list(set(a_lst))

if len(a_lst)==len(new_lst):
    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(set(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:
num = int(input())
nums = [n for n in map(int,input().split())]
ans = set(nums)

if len(nums) == len(ans):
    print('YES')
if len(nums) != len(ans):
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
import sys

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

is_in_a = set()

for item in a:
    if item in is_in_a:
        print('NO')
        sys.exit()
    else:
        is_in_a.add(item)

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

dic={}
flag=True
for i in range(n):
    v=al[i]
    dic[v]=dic.get(v,0)+1
    if dic[v]==2:
        flag=False
        break
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

l1 = len(A)
l2 = len(set(A))

print("YES" if l1 == l2 else "NO")

Submission status: Accepted

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

def main():
    N = int(input())
    a = list(map(int,input().split()))
    b = list(set(a))
    if len(b) == N:
        print("YES")
    else:
        print("NO")
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

A.sort()
# print(A)
flag = False
for i in range(len(A)):
    if(i+1 < len(A)):
        if(A[i] == A[i+1]):
            print("NO")
            flag = True
            break
if(not flag):
    print("YES")

Submission status: Accepted

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

n =int(input())
List=list(map(int,input().split()))
if has_duplicates(List) == False:
    print('YES')
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = True
pre = 0
for i in range(len(a)):
    if a[i] == pre:
        flag = False
    pre = a[i]
if flag:
    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:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])
 
def main():
    n = inp()
    a = inpl()
    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:
#!/usr/bin/env python3

import sys
import os


def main():
    n = int(sys.stdin.readline().strip())
    nstr = sys.stdin.readline().strip()

    ns = []
    i = 0
    for c in range(0, n):
        iend = nstr.find(" ", i)
        if iend < 0:
            iend = len(nstr)
        ns.append(int(nstr[i:iend]))
        i = iend + 1

    ns.sort()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
cnt = 0
from collections import Counter
B=Counter(A)
C=B.most_common()
if C[0][1] <= 1:
	print('YES')
else:
	print('NO')

Submission status: Accepted

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

d = dict()

for x in a:
  if x in d:
    print("NO")
    break
  else:
    d[x] = True
else:
  print("YES")

Submission status: Accepted

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

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

if a_list_len == a_set_len:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

def main():
    flag = 0
    new_A = sorted(A)

    for i in range(S-1):
        if new_A[i] == new_A[i+1]:
            flag = 1
            break
        else:
            continue

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = list(set(lis))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)

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

A.sort()

prev = -1
ans = 'YES'
for a in A:
    if a == prev:
        ans = 'NO'
        break

    prev = a

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
Sample Input 1

5
2 6 1 4 5
Sample Output 1

YES
'''
lens = int(input())
arrs = [int(x) for x in input().split()]
print(["NO", "YES"][len(arrs) == len(set(arrs))])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
al = int(input())
a = list(map(int, input().split()))
if al == len(set(a)):
  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())
numlist = list(map(int,input().split()))
numlist.sort()

check = 0
i = 0
while i < N-1:
    j = i + 1
    if numlist[i] == numlist[j]:
        check = 1
        break
    i = i + 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *A = map(int, read().split())
print('YES' if N==len(set(A)) else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s = set(x)

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
A = LI()
ans = 1
c = collections.Counter(A)
for key in c.keys():
    if c[key] > 1:
        ans = 0
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int, input().split()))
dic = {}
for i in lis:
    dic[i] = dic.get(i, 0) + 1
for j in dic.values():
    if j != 1:
        print('NO')
        break
else:
    print('YES')

Submission status: Accepted

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

#output
A = set(A)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
s = input().split()
s_map = set(s)

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

Submission status: Accepted

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

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')
    exit()
print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
S = list(map(int, input().split()))
setS = list(set(S))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
dic={}
A = list(map(lambda x:int(x),input().split()))
flag=True
for a in A:
  if a in dic.keys():
    flag=False
    break
  dic[a] = 1
if flag:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    a = sorted(list(map(int, input().rstrip('\n').split())))
    for i in range(1, n):
        if a[i] == a[i-1]:
            print("NO")
            exit()
    print("YES")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

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:
def solve():
    n = input()
    A = set(map(int, input().split()))

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

def main():
    solve()
    pass

if __name__ == '__main__':
    main()

Submission status: Accepted

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

flg = 0
for i in range(1,N):
  if S[i] == S[i-1]:
    flg = 1
    
if flg == 1:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
S = np.array([int(i) for i in input().split()])

if len(np.unique(S))==len(S):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
i = input()
l = input().split()
co = set(l)

if len(co) == len(l):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N = input()
A = input().rstrip().split()
As = len(set(A))
if len(A) == As:
    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
        break
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

A_dict = {}
ans = "YES"

for i in range(len(A)):
  if A[i] not in A_dict:
    A_dict[A[i]] = 1
  else:
    ans = "NO"
    break

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Flag = True

a = sorted(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

l = [int(i) for i in 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()))
if len(set(A)) < N:
  print('NO')
else:
  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 = int(input())
A = list(map(int,input().split()))
A.sort()
ans = "YES"
for i in range(1,N):
    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()))

h = {}
ans = 'YES'
for i in range(N):
    a = h.get(A[i], 0)
    if a != 0:
        ans = 'NO'
        break
    h[A[i]] = A[i]

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
v=set(input().split())
print("YNEOS"[len(v)<n::2])

Submission status: Accepted

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

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=int(input())
s=set(input().split())
if n==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:
n=int(input());print("YNEOS"[n!=len(set(input().split()))::2])

Submission status: Accepted

Solution code:
n=int(input())
v=list(map(int,input().split()))
print("YNEOS"[len(set(v))<n::2])

Submission status: Accepted

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

else:
    print('YES')

Submission status: Accepted

Solution code:
import math
import itertools
import fractions
import heapq
import collections
import bisect
import sys
import copy

sys.setrecursionlimit(10**9)
mod = 998244353
inf = 10**20

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

n = I()
a = LI()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
_,a=open(0);print('NYOE S'[eval('!='.join(sorted(a.split())))::2])

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