Problem:


Score : 300 points

Problem Statement

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

Constraints

2 ≤ N ≤ 200000

1 ≤ A_i ≤ 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

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

Sample Input 1

5
2 6 1 4 5

Sample Output 1

YES

The elements are pairwise distinct.

Sample Input 2

6
4 1 3 1 6 2

Sample Output 2

NO

The second and fourth elements are identical.

Sample Input 3

2
10000000 10000000

Sample Output 3

NO



Sample input:
5
2 6 1 4 5


Sample output:
YES

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

Solution code:
import sys


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
a = list(map(int,input().split()))
c=Counter(a)
ans = max(c.values())
    
if ans == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

appeared = set([])

for A in AAA:
    if A in appeared:
        print('NO')
        exit()
    appeared.add(A)

print('YES')

Submission status: Accepted

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

inList.sort()

noFlag = 0

for indx in range(len(inList) - 1):
  if inList[indx] == inList[indx + 1]:
    print("NO")
    noFlag = 1
    break

if noFlag == 0:
  print("YES")

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
        break

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

Submission status: Accepted

Solution code:
n = input()

hoge = input().split()

fuga = list(set(hoge))

if(len(hoge) == len(fuga)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n= int(input())
a = [int(i) for i in input().split()]
def has_duplicates(seq):
    return len(seq) != len(set(seq))
ans = has_duplicates(a)
if ans == True:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

# Initializing variables
intNums = int(input())
intList = list(map(int, input().split()))
c = max(Counter(intList).values())

# Calculating if the input is pairwise distinct or not
if c > 1:
    print('NO')
else:
    print('YES')

# Check out my Youtube channel! https://www.youtube.com/channel/UCMOKVyAbTZOpKikTrX5dy_A

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc 154 c
# input
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:
#C - Distinct or Not
#最初の要素数(n)と重複を取り除いた後の要素数(after_set)を比較する

#操作前の要素数(n)とリスト(numbers)
n = int(input())
numbers = list(map(int,input().split()))

#重複を取り除く(set()を使う)
unique_numbers = list(set(numbers))
after_set = len(unique_numbers)

#一致していれば'YES'、一致していなければ'NO'を出力
if(n == after_set):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
y = set(input().split(" "))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
l = list(map(int, input().split()))
c = collections.Counter(l)
if len(c) == len(l):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

def main():
    n = int(input())
    ai = list(map(int, input().split()))
    ais = set(ai)
    print("YES" if len(ais) == len(ai) else "NO")


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = 0
c = {}
for word in b:
    if word in c:
        flag = 1
        break
    else:
        c[word] = 1

if flag == 0:
    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:
import numpy as np
n = int(input())
a = [int(i) for i in input().split(" ")]
if len(np.unique(a))==n:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
L = [int(_) for _ in stdin.readline().rstrip().split()]
lsl = len(set(L))
if N == lsl:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

y = -1
count = 0
for x in Bn:
    if x == y:
        count += 1
    y = x

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

Submission status: Accepted

Solution code:
n = input()

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

set_array = list(set(array))

if len(array) == len(set_array):
    print('YES')

else:
    print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

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

flag = True
a.sort()
for i in range(n - 1):
    if a[i] == a[i + 1]:
        flag = False
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
def main():
    l= sys.stdin.readline()
    count = int(l.strip())
    l = sys.stdin.readline()
    nums = list(map(int, l.split()))
    check = dict()
    for n in nums:
        if n in check:
            return "NO"
            
        else:
            check[n] = True
    return "YES"
if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

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

A = set(A)

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

Submission status: Accepted

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

if c.most_common()[0][1] >= 2:
  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:
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

# Initializing variables
n = int(input())
ai = list(map(int, input().split()))
c = max(Counter(ai).values())

# Calculating if the input is pairwise distinct or not
if c > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read#全部読み込むやつ
readline = sys.stdin.buffer.readline#1行読み込むやつ
readlines = sys.stdin.buffer.readlines#リストで読み込むらしい

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

setA = len(set(A))


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
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 fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    A=set(LI())
    print(["NO","YES"][len(A)==N])

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

s = set()

for ai in a:
    s.add(ai)

can = len(s) == n

print("YES" if can else "NO")

Submission status: Accepted

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

from collections import Counter

Acnt = Counter(A)
flag = False
for _, cnt in Acnt.items():
    if cnt > 1:
        flag = True

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    tmp = set(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    A = [int(a) for a in input().split()]
    A = set(A)
    if len(A) == N: print("YES")
    else: print("NO")

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
from itertools import accumulate

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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 = list(map(int, input().split()))
s = set(A)

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

Submission status: Accepted

Solution code:
def main():
    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]:
            return print("NO")
    print("YES")


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter

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

ans = Counter(A)
max_value = max(ans.values())

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

Submission status: Accepted

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

Submission status: Accepted

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

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


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


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

a_set = set(a_list)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
kazu1 = int(input())
kazu2 = list(map(int, input().split()))

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

if has_duplicates(kazu2):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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


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

flg = has_duplicates(a)

if not flg:
    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:
n = int(input())
a = list(map(int, input().split()))

b = set(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


num_2 = len(set(list_1))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#標準入力
n = int(input())
#入力。標準入力を文字列として取り込み
hai_l = list(map(int, input().split()))

#リストをソートしてから、隣同士の比較
#→やらない。setで重複削除したリストを作って、リスト長をチェック。一致してたらOK
if len(set(hai_l)) == len(hai_l):
	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")
		exit()
print("YES")

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

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

A.sort()
# print(A)
# print(N//2)
for i in range(N // 2):
    # print(i)
    # print(A[i])
    # print(A[i+1])
    
    if A[i] == A[i+1]:
        print("NO")
        exit()
    elif A[-1-i] == A[-2-i]:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:
# ABC154 C

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()
list = [s for s in input().split()]
set = set(list)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
A=input().split()
not_same=1
A.sort()

for i in range(len(A)-1):
    if A[i]==A[i+1]:
        print('NO')
        break
    else:
        not_same += 1

if not_same == N:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

val = len(set(A))

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

Submission status: Accepted

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

#aから重複した要素を省いたリスト
b = list(set(a))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A_list=map(int,input().split(" "))
A_set=set(A_list)
A_num=len(A_set)
if N==A_num:
    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())
l=list(input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections

def distinct(N, A):
  counted = collections.Counter(A)
  max = counted.most_common()[0][1]
  if max >= 2:
    print('NO')
  else:
    print('YES')
    
N = int(input())
A = list(map(int, input().split()))
distinct(N, A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def has_duplicates(seq):
    if len(seq) != len(set(seq)):
        return "NO"
    else:
        return "YES"

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

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

a_set = set(a_list)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 自分の
N = int(input())
a_arr = list(map(int, input().split()))

new_a_arr = sorted(a_arr)

for i in range(N-1):
    if new_a_arr[i]==new_a_arr[i+1]:
        print("NO")
        break
    elif i==N-2:
        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()))

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

if len(a)==len(set(a)):
	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())
nums = input().split()
nums = set(nums)
if len(nums) == 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 = [int(i) for i in 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 = list(map(int, input().split()))
B = A
if len(B) == len(list(set(A))):
  print("YES")
else:
  print("NO")

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

Submission status: Accepted

Solution code:
from sys import stdin


def get_result(data):
    N, A = data[0], data[1]
    return 'YES' if len(set(A)) == N[0] else 'NO'

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n = ii()
    a = li()

    a = sorted(a)
    
    for i in range(1,n):
        if a[i] == a[i-1]:
            print('NO')
            exit()

    print('YES')
            




main()

Submission status: Accepted

Solution code:
n=int(input())
d=dict()
s=list(map(int,input().split()))
for i in s:
  if i in d:
    d[i]=2
  else:
    d[i]=1
if 2 in d.values():
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

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

print("YES")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
s = set()
for i in l:
    if (i in s):
        print("NO")
        exit(0)
    s.add(i)
print("YES")

Submission status: Accepted

Solution code:
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n = ii()
    a = li()

    a = sorted(a)
    
    for i in range(1,n):
        if a[i] == a[i-1]:
            print('NO')
            exit()
            
    print('YES')
            




main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N-1):
  if A[i] != A[i+1]:
    pass
  else:
    print('NO')
    break
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())
A = list(map(int, input().split()))
setA = set(A)
if(len(A) == len(setA)):
    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(0)
print("YES")

Submission status: Accepted

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