Problem:


Score : 300 points

Problem Statement

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

Constraints

2 ≤ N ≤ 200000

1 ≤ A_i ≤ 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

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

Sample Input 1

5
2 6 1 4 5

Sample Output 1

YES

The elements are pairwise distinct.

Sample Input 2

6
4 1 3 1 6 2

Sample Output 2

NO

The second and fourth elements are identical.

Sample Input 3

2
10000000 10000000

Sample Output 3

NO



Sample input:
5
2 6 1 4 5


Sample output:
YES

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))  # [1, 2, 3, 4] になる

len2 = len(set(A))
if N == len2:
    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(i) for i in input().split(' ')]

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

Submission status: Accepted

Solution code:
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 
def prime_list(n):
    li = [i for i in range(2, n+1)]
    for i in range(len(li)):
        if li[i] >= int(math.sqrt(n)):
            break
        if li[i] == -1:
            continue
        for j in range(i+1, len(li)):
            if li[j] % li[i] == 0:
                li[j] = -1
    return [n for n in li if n != -1]
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while True:
        r = a % b
        if r == 0: return b
        a, b = b, r
def lcm(a, b):
    return int(a * b / gcd(a,b))
def all_subset(li):
    s = []
    n = len(li)
    for bit in range(0, (1<<(n+1))):
        ss = set()
        for i in range(0, n):
            if (bit & (1 << i)):
                ss.add(li[i])
        s.append(ss)
    return s
def factorial(n):
    if n == 1:
        return 1
    return n * factorial(n-1)
def mCn(m, n):
    def factorial_ntimes(m, n):
        r = 1
        while n:
            r *= m
            m -= 1
            n -= 1
        return r
    return int(factorial_ntimes(m, n) / factorial(n))

n = load()
A = load_list()

if n == len(set(A)):
    print('YES')
else:
    print('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())
an = list(map(int, input().split()))
 
def distinct_or_not(an):
    an_dict = {}
    for a in an:
        if a in an_dict:
            return False
        else:
            an_dict[a] = 1
    return True
  
if distinct_or_not(an):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

dict = {}
for i in lists:
    if not i in dict:
        dict[i] = 0
    if i in dict:
        dict[i] += 1

if 2 in dict.values():
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
n = int(input())
numbers = list(map(int,input().split()))
numbers_set = set()

for number in numbers:
    if number in numbers_set:
        print("NO")
        exit()
    else:
        numbers_set.add(number)
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

table = {}
answer = 'YES'
for i in range(0, len(A)):
    Ai = A[i]
    count = table.get(Ai) + 1 if table.get(Ai) else 1
    table[Ai] = count

    if table.get(Ai) >= 2:
        answer = 'NO'
        break

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    n = int(input())
    a = set(map(int, input().split()))

    result = "NO"
    if n == len(a):
        result = "YES"

    return result


if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

sa = sorted(a)
c = 0
for i in range(len(sa)-1):
    if sa[i] == sa[i+1]:
        c = 1

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int,input().split()))
import collections
co = collections.Counter(A)
for num,c in co.items():
    if c >1:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from collections import Counter as ct
    n = int(input())
    a = list(map(int, input().split()))
    if len(ct(a)) == n:
        print("YES")
    else:
        print("NO")


main()

Submission status: Accepted

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

d = {x:0 for x in A}
for x in A:
    d[x] += 1

if max(d.values()) >= 2:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
A = list(map(int,input().split()))
res = dict()
for key in A:
  if key not in res:
    res[key] = 0
  res[key] += 1
  if res[key] >= 2:
    print('NO')
    sys.exit(0)
print('YES')

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = input()
s = input().split()
AN = list(s)
BN=set(AN)
if len(AN)==len(BN):
    print("YES")
else :
    print("NO")

Submission status: Accepted

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

judge = True
if len(A) != len(set(A)):
    judge = False

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A = sorted(A)
fl = True

for i in range (1 , N) :
    if (A[i - 1] == A[i]) :
        fl = False
        break

print ('YES' if fl else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for x in a:
    d[x] = d.get(x, 0) + 1

t = max(d.values())

print("YES") if t == 1 else print("NO")

Submission status: Accepted

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

    print("YES")
    return

cal()

Submission status: Accepted

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

    N = int(input())
    A = [i for i in input().split()]
    if has_duplicates(A):
        print('NO')
    else:
        print('YES')


if __name__ == '__main__':
    q3()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
input()
lst = input().split()
dic = dict(Counter(lst))
x = max(list(dic.values())) - 1
if x:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
b = input()
l = list(map(int, input().split()))
ldistinct = set(l)

if len(ldistinct) < len(l):
	print('NO')
else:
	print('YES')

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from collections import Counter
N=int(input())
l=input().split()
l=Counter(l)
l=l.most_common()

c=len(l)
d=0

for i in l:
    if i[1]==1:
        d+=1
if d==c:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
num_dict = {}
for i in A:
    if i in num_dict.keys():
        num_dict[i] += 1
    else:
        num_dict[i] = 1
ok = 0
for i in num_dict.values():
    if i >= 2:
        print('NO')
        ok = 1
        break
if ok == 0:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
d = dict()
for i in a:
    d[i] = 0
if len(d) == len(a):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("YES")

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(A)
m_c = c.most_common()

if(m_c[0][1] > 1):
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def dis_pair(arr1,n):
    dict1={}
    for i in arr1:
        if i in dict1:
            return "NO"
        else:
            dict1[i]=1
    return "YES"
n=int(input())
arr1=list(map(int,input().strip().split()))[:n]
print(dis_pair(arr1,n))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = input()
num_list = list(map(int,input().split()))
num_list = np.sort(num_list)

flag = False
for i in range(len(num_list)):
    if i == len(num_list)-1:
        break
    
    if num_list[i] == num_list[i+1]:
        flag = True
        break
        
if flag:
    print('NO')

else:
    print('YES')

Submission status: Accepted

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

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


def solve(N: int, A: "List[int]"):
    s = set()
    for a in A:
        if a in s:
            print(NO)
            exit()
        s.add(a)
    print(YES)
    return


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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] == 0:
    print('NO')
    exit()
print('YES')

Submission status: Accepted

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

dict = {}
flag = True
for i in range(N):
    if A[i] in dict:
        flag = False
    else:
        dict[A[i]] = 0
if flag:
    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:
import sys

n=int(input())

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

a.sort()

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

print("YES")

Submission status: Accepted

Solution code:
N=int(input())
A=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(i) for i in input().split(" ")]
memo={}
for a in A:
    if a in memo:
        print("NO")
        break
    else:
        memo[a]=1
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# 標準入力 <int>
N = int(input())
# 標準入力 <int> list[]
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n=int(input())
b=input().split()

if len(set(b))==n:
  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:
n=int(input())
a=[int(j) for j in set(input().split())]
if(n==len(a)):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

d = {}
for i in m:
    if i in d:
        print("NO")
        exit(0)
    d[i] = 1
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
d=set()
for aa in a:
    d.add(aa)

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

Submission status: Accepted

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

for i in d.values():
    if i != 1:
        print('NO')
        exit()

print('YES')

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]

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

Submission status: Accepted

Solution code:
# import bisect
from collections import Counter, deque
# from copy import copy, deepcopy
# from fractions import gcd
# from functools import reduce
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
# import math
# import numpy as np
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline

def resolve():

    N=int(input())
    A=list(map(int,input().split()))
    AA=Counter(A)
    def main():
        for i in AA.values():
            if i>=2:
                return 'NO'
        return 'YES'
    print(main())

resolve()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if len(A) == N:
    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:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()] 

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

Submission status: Accepted

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

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:
def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    if len(A) == len((set(A))):
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

l = sorted(a)
answer = max(x - y for x, y in zip(l, l[1:]))
if answer == 0:
    print('NO')
else:
    print('YES')

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

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:
import sys
input = sys.stdin.readline
x = int(input())
from collections import defaultdict
A=[int(i) for i in input().split()]
dd=defaultdict(int)
for a in A:
    dd[a]+=1
for i in dd:
    if dd[i] > 1:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
A = iil()
B = set(A)
if len(A) == len(B):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/C-DistinctOrNot.py
#
import collections

n = int(input())

a = i = list(map(int, input().split()))
c = collections.Counter(a)
number_of_words = len(c)

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

Submission status: Accepted

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

a_count = Counter(a)
values, counts = zip(*a_count.most_common())

for i in counts:
    if i != 1:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
a=sorted(A)
try:
  for i in range(n):
    if a[i]==a[i+1]:
      print('NO')
      exit()
except IndexError:
    pass
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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


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

    if has_duplicates(a):
        print('NO')
    else:
        print('YES')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = list(map(int,input().split()))
    #B = set(A)
    #C = len(B)
    if N == len(set(A)):
        print("YES")
    else:
        print("NO")
    # Uniqueにする
    # 　Aとlennを比較数
    # countsu

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in set(a):
  count+=1
  
if count==n:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

print('YES')

Submission status: Accepted

Solution code:
N = list(input().split())
A = list(map(int, 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:
#!/usr/bin/env python3
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
print(["NO", "YES"][all(a[x] <= 1 for x in a)])

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

Submission status: Accepted

Solution code:
import 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())
#s = [input().split() for i in range(n)] 
s = list(map(int, input().split()))
#print(s)
t = set(s)
if len(t) == len(s):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(A)
if len(c.values()) == N:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections

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

a_counter = collections.Counter(a_list)

ans = "YES"
for value in a_counter.values():
  if value > 1:
    ans = "NO"
    break

print(ans)

Submission status: Accepted

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

#
from collections import Counter
A_counter = Counter(A)
A_max = max(A_counter.values())
if 1 < A_max: # ２以上なら同じものが複数あるとういうこと
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
import copy
import math
import string
import heapq
import bisect
import sys
sys.setrecursionlimit(10**7)

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

print("YES" if len(set(input().split())) == n  else "NO")