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 solve(n, a_list):
    if len(set(a_list)) == n:
        return "YES"
    else:
        return "NO"


def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    res = solve(n, a_list)
    print(res)


def test():
    assert solve(5, [2, 6, 1, 4, 5]) == "YES"
    assert solve(6, [4, 1, 3, 1, 6, 2]) == "NO"
    assert solve(2, [10000000, 10000000]) == "NO"


if __name__ == "__main__":
    test()
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=[int(_) for _ 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()))
aa = set(a)
if len(a) == len(aa):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

res = 'YES'
for i, a in enumerate(A):
    if i < N - 1 and a == A[i + 1]:
        res = 'NO'

print(res)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
a = sorted(a)
tmp = 0
ans = 'YES'
for aa in a:
    if tmp == aa:
        ans = 'NO'
        break
    tmp = aa
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

st = set(ls)

if len(ls) == len(st):
    print("YES")
elif len(ls) != len(st):
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
d = defaultdict(int)

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

for i in li:
  d[i] += 1

ans = 'YES'

for i in d:
  if d[i] != 1:
    ans = 'NO'

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:
key = {}
input()
for i in input().split(" "):
  if i not in key:
    key[i] = True
  else:
    print("NO")
    break
else:
  print("YES")

Submission status: Accepted

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

f = False
for i in range(l-1):
    if A[i] == A[i+1]:
        f = True
        break

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

Submission status: Accepted

Solution code:
from sys import exit

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

from collections import Counter

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

Submission status: Accepted

Solution code:
# abc 154
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

N = int(readline().strip())
A = list(map(int, readline().split()))

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

Submission status: Accepted

Solution code:
N = int(input())
r = set()
for a in  map(int, input().split()):
    if a in r:
        print("NO")
        exit()
    r.add(a)
print("YES")

Submission status: Accepted

Solution code:
import sys

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

r.sort()

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

print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()
arr=limii()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = set(LI())
    if len(a) == n:
        print("YES")
    else:
        print("NO")
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:

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

new_a = list(set(a))

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
A=list(map(int,input().split()))

temp=A[:]
temp=list(set(temp))

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

Submission status: Accepted

Solution code:
def main():
	import sys
	input = sys.stdin.readline
	N = int(input())
	A = list(map(int, input().split()))
	B = list(set(A))
	if len(A) == len(B):
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

set_a = set(a)

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

Submission status: Accepted

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

n = int(input())
A = [int(i) for i in input().split()]
As = set(A)

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

Submission status: Accepted

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

B=sorted(A)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

l_set = set(l)

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

Submission status: Accepted

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

def solution(N, A):
    for i in range(N - 1):
        if A[i] == A[i + 1]:
            return "NO"
    return "YES"

print(solution(N, A))

Submission status: Accepted

Solution code:
#C

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split())) # list()でリスト化、それを変数に代入。
onazi = False

a.sort()

for i in range(n-1):
    if a[i]==a[i+1]:
        onazi = True
        break

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

Submission status: Accepted

Solution code:
n = int(input())
a = {x for x in input().split()}
if len(a) == n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(input())

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

sort_list = set(Input)

if len(Input)==len(sort_list):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
n = int(input())
a_i = input().split()
list = []
for x in range(n):
    list.append(a_i[x])
list.sort()
answer = 'YES'
for id in range(n - 1):
    if list[id] == list[id + 1]: answer = 'NO'
print(answer)

Submission status: Accepted

Solution code:
#
import sys
import math
import numpy as np
import itertools


# ひとつ入力
n = int(input())
# 空白区切りの数列をリストに代入
t = [int(i) for i in input().split()] 

t.sort()

for i in range(1,n):
    if t[i]==t[i-1]:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#300
N = int(input())
A = list(map(int,input().split()))
B = sorted(A)
judge = 1
for i in range(N-1):
    if B[i] == B[i+1]:
        judge =  0

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

Submission status: Accepted

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

h = {}
for i in a:
    if i in h:
        print('NO')
        exit(0)
    else:
        h[i] = 0
print('YES')

Submission status: Accepted

Solution code:
N = int(input())

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

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

S = {i for i in A}
print('YES' if len(S) == N else 'NO')

Submission status: Accepted

Solution code:
from collections import defaultdict
dic = defaultdict(int)
n = int(input())
a = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

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

Submission status: Accepted

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

A_setted = set(A)

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    s, t = input().split()
    a, b = LI()
    u = input()
    if u == s:
        print("{} {}".format(a - 1, b))
    elif u == t:
        print("{} {}".format(a, b - 1))
    return


# B
def B():
    s = input()
    print('x' * len(s))
    return


# C
def C():
    n = I()
    a = LI()
    s = set()
    for i in a:
        s.add(i)
    if len(s) == n:
        print('YES')
    else:
        print('NO')
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Solve
if __name__ == "__main__":
    C()

Submission status: Accepted

Solution code:
import sys


def solve():
    N, *A = map(int, sys.stdin.read().split())
    return 'YES' if len(set(A)) == N else 'NO'


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

Submission status: Accepted

Solution code:
n=int(input())
nums=input().split()
appeared={}
for num in nums:
  if num in appeared:
    print('NO')
    break
  appeared[num]=0
else:
  print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

new_arr = set(arr)

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

Submission status: Accepted

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


if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))

    main(n, a)

Submission status: Accepted

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

d = {}
for a in As:
    if a not in d:
        d[a] = 0

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

Submission status: Accepted

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

A = sorted(A)

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

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

Submission status: Accepted

Solution code:
# A = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

import collections

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

l = len(set(A))

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

Submission status: Accepted

Solution code:
from sys import stdin

if __name__ == '__main__':
    N = int(stdin.readline().rstrip())
    A = stdin.readline().rstrip().split()
    ori_len = len(A)
    setA = set(A)
    set_len = len(setA)
    if ori_len == set_len:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
#import re
import sys
#input = sys.stdin.readline
#import heapq
#import bisect
#from collections import deque
#import math

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

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==1:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

uni = set(a)

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

Submission status: Accepted

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

    print(ans)


main()

Submission status: Accepted

Solution code:
N = int(input())
nums = list(map(int, input().split()))
s = set()
for num in nums:
    if num in s:
        print('NO')
        exit()
    s.add(num)
print('YES')

Submission status: Accepted

Solution code:
from collections import defaultdict

def main():
    memo = defaultdict(int)
    N = int(input())
    nums = list(map(int,input().split()))

    for n in nums:
#        print(n)
        if memo[n]:
            return False
        else:
            memo[n] += 1
    return True

if __name__ == '__main__':
    if main():
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

A.sort()

flag=0

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#A の要素数
B = len(set(A))

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

Submission status: Accepted

Solution code:
N=int(input())

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

a_list.sort()

flag=False
for i in range((N)-1):
    if a_list[i]==a_list[i+1]:
        flag=True
        break

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
l_set = set(l)
if n == len(l_set):
    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:
input()
dic = {}
flag=True
for i in input().split():
    if dic.setdefault(i,0)==1:
        flag=False
        break
    dic[i]=1
print("YES" if flag else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(['YES','NO'][int(input())>len(set(map(int,input().split())))])

Submission status: Accepted

Solution code:
def main():
  N=int(input())
  A=list(map(int, input().split()))
  A=sorted(A)
  a=A[0]
  for i in range(1,N):
    if a==A[i]:
      print('NO')
      return
    else:
      a=A[i]
  print('YES')
  return

main()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8 ff=unix


def solv(A):
    A = sorted(A)
    a0 = A[0]
    for a in A[1:]:
        if a0 == a:
            return "NO"
        a0 = a
    return "YES"


if __name__ == "__main__":

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

    ans = solv(A)

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
from sys import stdin
from copy import deepcopy
from functools import reduce
from fractions import gcd
import math
import itertools
from collections import Counter
from itertools import chain  ##list(chain.from_iterable(l)) ##flatten
from heapq import heappush, heappop

"""
N = int(input())
A, B = map(int,input().split())
A = list(map(int,input().split())) ## 横一列
A = [int(input()) for _ in range(N)] ## 縦一列
lst = [list(map(int,input().split())) for i in range(M)] ## 二次元
"""

N = int(input())
A = list(map(int,input().split())) ## 横一列

A = sorted(A)

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    aa = sorted(list(map(int, input().split())))
    i = 0
    while i < n - 1 and aa[i] != aa[i + 1]:
        i += 1
    if i == n - 1:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

exists = set()

for a in A:
    if a in exists:
        print('NO')
        break
    exists.add(a)
else:
    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:
I = int(input())
A = set(map(int, input().split()))
if I == len(A):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

As.sort()

for i in range(N-1):
    if As[i] == As[i+1]:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

aSet = set(A)

if len(aSet) < len(A):
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
from collections import Counter


len_arr = int(input())
arr = list(map(int, input().split()))
c = Counter(arr)

m = c.most_common(1)[0][1]

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

Submission status: Accepted

Solution code:
def main():
    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:
#from fractions import gcd
#mod = 10 ** 9 + 7
#N = int(input())
#a = list(map(int,input().split()))
#a,b,c = map(int,input().split())
#ans = [0] * N
#math.ceilで切り上げ
import math
import string

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

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

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

N = intinput()
dic = {}
A = listintinput()
flag = 0
for i in A:
    if i in dic:
        flag = 1
        break
    else:
        dic[i] = 1

if flag == 0:
    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:
#  --*-coding:utf-8-*--

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

lastA = None
for a in A:
    if a == lastA:
        print('NO')
        break
    
    lastA = a
else:
    print('YES')

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

Submission status: Accepted

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

if len(num)==len(set(num)):
  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:
# ABC154 C
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n=int(input())
a=nl()
d=set(a)

if len(d)==n:
    print('YES')
elif len(d)<n:
    print('NO')

Submission status: Accepted

Solution code:
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = sys.stdin.readline

def eprint(s):
    if type(s) != type('str'):
        s=str(s)

    sys.stderr.write(s+'\n')
    return

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    data = set()
    for i in input().split(" "):
        if i in data:
            print("NO")
            return
        data.add(i)
    print("YES")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

array = map(int, input().split())

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

Submission status: Accepted

Solution code:
import unittest


class TestC(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think([2, 6, 1, 4, 5]), 'YES')

    def test_2(self):
        self.assertEqual(think([4, 1, 3, 1, 6, 2]), 'NO')

    def test_3(self):
        self.assertEqual(think([10000000, 10000000]), 'NO')


def solve():
    a = read()
    result = think(a)
    write(result)


def read():
    n = read_int(1)[0]
    return read_int(n)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a):
    return 'YES' if len(a) == len(set(a)) else 'NO'


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()