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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def main():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = {}
    for val in a:
        cnt[val] = cnt.get(val, 0) + 1
    distinct = True
    for val in cnt:
        if cnt[val] > 1:
            distinct = False
    if distinct:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Accepted

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


if len(set(lst))==len(lst):
	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 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:
from collections import Counter
import sys
n = int(input())
l = sys.stdin.read().split()
c = Counter(l)
m = max(c.values())

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
a = list(map(int,input().split()))
A = Counter(a)
for v in A.values():
  if v >= 2:
    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):
  if A[i] == A[i-1]:
    print("NO")
    break
else:
  print("YES")

Submission status: Accepted

Solution code:
import collections

s = int(input())

l = list(map(int,input().split(" ")))
c = collections.Counter(l)

if s == len(c):
    print("YES")
elif s != len(c):
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit

N = int(input())
A = sorted([int(a) for a in input().split()])
tmp = A[0]
for i in range(N - 1):
  if A[i + 1] == tmp:
    print("NO")
    exit()
  tmp = A[i + 1]
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input();A=list(map(int,input().split()));print("YNEOS"[len(A)>len(set(A))::2])

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())
d = {}
distinct = True
for i in map(int, input().split()):
    try:
        d[i] += 1
        distinct = False
        break
    except:
        d[i] = 0
if distinct:
    print("YES")
else:
    print("NO")

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())
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:
from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


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

main()

Submission status: Accepted

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

else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a = [int(x) for x in 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("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
a = list(map(int, input().split()))
ans = max(Counter(a).values())
if ans < 2:
  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 collections

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

a_dict = collections.Counter(a)

if max(a_dict.values()) > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
abc = list(map(int, input().split()))
ans = 'YES'
abc = sorted(abc)
for i in range(n-1):
  if abc[i] == abc[i+1]:
  	ans ='NO'

print(ans)

Submission status: Accepted

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

a = sorted(a)
z = True

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

if z:
    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())
count = 0
a = list(map(int,input().split()))
a.sort()
for i in range(1,n):
    if a[i-1] == a[i]:
        count+=1
if count == 0:
    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, *A = map(int, open(0).read().split())
print('YES' if len(A) == len(set(A)) else 'NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

if len(check) == 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=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())
L = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import collections

n=int(input())
l=input().split()

c=collections.Counter(l)
cc=c.most_common()

if cc[0][1]==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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


def solve(N: int, A: "List[int]"):
    Aset = set(A)
    if len(Aset) < N:
        print(NO)
    else:
        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())
aa = list(map(int, input().split(' ')))

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

Submission status: Accepted

Solution code:
numOp = int(input())
intList = list(map(int, input().split()))

intList.sort()
for i in range(numOp):
    if intList[i] == intList[i - 1]:
        print('NO')
        break
    elif i == (numOp - 1):
        print('YES')

Submission status: Accepted

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

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())
#n,m=map(int,input().split())
al=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

al.sort()
ans="YES"
for i in range(1,n):
    if al[i]==al[i-1]:
        ans="NO"
        break
print(ans)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
al = list(map(int, input().split()))
al.sort()

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:
import time
start = time.time()

n = int(input())
a = list(map(int, input().split()))
# # a = [i for i in range(n)]
# st = set()
# for i in range(n):
#     st.add(a[i])
# if len(st) == n: print("YES")
# else: print("NO")

# print(time.time() - start)

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 time
start = time.time()

n = int(input())
a = list(map(int, input().split()))
# a = [i for i in range(n)]
st = set()
for i in range(n):
    st.add(a[i])
if len(st) == n: print("YES")
else: print("NO")

# print(time.time() - start)

Submission status: Accepted

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

l1=len(A)
l2=len(B)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# C - Distinct or Not

N = int(input())
A = list(int(x) for x in input().split())

A = sorted(A)
ans = 'YES'

for i in range(1, N):
    if A[i-1]==A[i]:
        ans = 'NO'
        break

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

A.sort()

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

print('YES')

Submission status: Accepted

Solution code:
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd
# fractions.gcd() を用いること
# math.log2()はatcoderでは対応していない．留意せよ．

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


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

    # check if "for all i in [0,n-1], C[a[i]] == 0"
    C = Counter()
    for i in range(n):
        if C[a[i]] != 0:  # fail
            print("NO")
            return
        else:             # pass
            C[a[i]] += 1
    print("YES")
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
y = map(int, input().split())
k = list(y)
t = len(set(k))
q = len(k)

if q > t:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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


set = set(list)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = int(input())
line = [int(a) for a in input().split()]
set_line = list(set(line))

if len(line) == len(set_line):
    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(0, N - 1, 1):
	if A[i] == A[i + 1]:
		print("NO")
		sys.exit(0)

print("YES")

Submission status: Accepted

Solution code:
import sys
n=int(input())
s=set()
x=list(map(int,input().split()))
for a in x:
    if a in s:
        print("NO")
        sys.exit()
    else: s.add(a)
print("YES")

Submission status: Accepted

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

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

heap = []
# heapに突っ込む
for v in a_list:
    heapq.heappush(heap, v)

sorted_a = [heapq.heappop(heap) for i in range(len(heap))]

max_len = len(sorted_a)
for i in range(max_len):
    if i == max_len-1:
        break
    if sorted_a[i] == sorted_a[i+1]:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:
import sys


def main():
  input = sys.stdin.readline
  n = int(input())
  a_li = list(input().split())
  a_li = [int(s) for s in a_li]

  a_li.sort()
  for i in range(n-1):
    if a_li[i] == a_li[i+1]:
      print("NO")
      sys.exit()
  print("YES")
  
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()))

A.sort()
flag=True
for i in range(0,N-1):
    if A[i]==A[i+1]:
        flag=False
        break;
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
def main():
    n = int(input())
    
    a_list = list(map(int, input().split()))

    c = collections.Counter(a_list)    

    ans = c.most_common(1)

    if ans[0][1] >= 2:
        print('NO')
    else:
        print('YES')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ans = 'YES'
alist = list(map(int,input().split()))
aset = set(alist)
if len(aset) ==len(alist):
  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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

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

def solve(N: int, A: "List[int]"):
    if len(list(set(A))) == N:
        print(YES)
    else:
        print(NO)
    return



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

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int,input().split()))
c = 0
nums = sorted(nums)

for i in range(n-1):
    if nums[i] == nums[i+1]:
        c += 1
        break
    
if c != 0:
    print('NO')

else:
    print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = 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(map(int, input().split()))
ans = {}
b = True
for i in A:
  if i in ans:
    b = False
    break
  else:
    ans[i] = 0
    
if b:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import math
# import bisect
# import heapq
# from collections import deque
# import numpy as np

# a,b,c = map(int, input().split())
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())
numbers = [int(x) for x in input().split()]
numbers.sort()
ans = "YES"
for i in range(N-1):
  if numbers[i] == numbers[i+1]:
    ans = "NO"
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = {}
ans = 'YES'
for a in A:
    if a in cnt: ans = 'NO'
    cnt[a] = None

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

num1 = len(list)
num2 = len(set(list))

if num1 == num2:
    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:
def submit():
    n = int(input())
    alist = list(map(int, input().split()))

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


if __name__ == "__main__":
    submit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num_A = input().split()
num_B = input().split()
#print(num_A)
#print(num_B)

test_A = {}
test_B = {}

for i in num_A:
  if i not in test_A:
    test_A[i] = 1
  else:
    test_A[i] += 1
max_A =max(test_A.values())
#print(max_A)

for i in num_B:
  if i not in test_B:
    test_B[i] = 1
  else:
    test_B[i] += 1
max_B =max(test_B.values())
#print(max_B)

if max_A == max_B == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int,input().split()))
ret = "NO"
if len(set(a)) == n:
    ret = "YES"

print(ret)

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
c = Counter(map(int, input().split()))

print("YES" if c.most_common(1)[0][1] <= 1 else "NO")

Submission status: Accepted

Solution code:
import numpy as np
from collections import Counter

# 最頻値
def mode(list):
    c = Counter(list)
    freq_scores = c.most_common()
    max_count = freq_scores[0][1]
    modes = []
    for num in freq_scores:
        if num[1] == max_count:
            modes.append(num[0])
    return(modes)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from itertools import groupby


def input():
    return sys.stdin.readline()[:-1]


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


if __name__ == "__main__":
    solve()

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:
import sys
msg = sys.stdin.readlines()
a = []
for x in msg:
  a.append(x.replace('\n', ''))
arra = a[1].split(' ')
arra = [int(x) for x in arra]
if len(arra) == len(set(arra)):
  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:
import sys
input = sys.stdin.readline

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:
import sys
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:
from collections import defaultdict

n = int(input())
as_ = map(int, input().strip().split())

counts = defaultdict(int)

for a in as_:
    counts[a] += 1

if max(counts.values()) > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
from sys import stdin
import math

n = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]

d = {}
for aa in a:
    if aa in d.keys():
        d[aa] += 1
    else:
        d[aa] = 1

result = 'YES'
for key, value in d.items():
    if value > 1:
        result = 'NO'

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s=input()
array=[]
array+=(int(x) for x in input().split())
array.sort()
def judge(array,s):
  for i in range(int(s)-1):
    if array[i] == array[i+1]:
        return "NO"
  return "YES"

print(judge(array,s))

Submission status: Accepted

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

def judge(lst):
  for i in range(1, len(lst)):
    if lst[i] == lst[i-1]:
      return "NO"
  return "YES"
    
print(judge(List))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

N_set = len(set(A))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
A = 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()))
a = sorted(a)
ans = 'YES'
for i in range(n-1):
    if a[i] == a[i+1]:
        ans = 'NO'
        break
print(ans)

Submission status: Accepted

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

print(solve())

Submission status: Accepted

Solution code:
num = 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')
    exit()
print('YES')

Submission status: Accepted

Solution code:
import collections as cl

N = int(input())
A_li = [int(i) for i in input().split()]
mc = cl.Counter(A_li).most_common()
if (mc[0][1] == 1) :
    print("YES")
else :
    print("NO")

Submission status: Accepted

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

aa = sorted(a)
flag=True
for i in range(n-1):
    if aa[i]==aa[i+1]:
        flag=False
if flag:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = input()
nums = list(input().split())

nums_set = set(nums)
print('YES' if len(nums) == len(nums_set) else 'NO')

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
C = Counter(A)
d = C.most_common()[0][1]

if d > 1:
    print('NO')
else:
    print('YES')