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:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = list(set(readInts()))
print('YES' if n == len(A) else 'NO')

Submission status: Accepted

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

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

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

# b,r = map(str, readline().split())
# A,B = map(int, readline().split())
N = I()
A = LI()

def main():
    judge=False
    if len(set(A))==N:
        judge=True
    if judge:
        return 'YES'
    else:
        return 'NO'
print(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()))
C = {}
for i in range(N):
    a = A[i]
    if a not in C:
        C[a] = 0
    C[a] += 1
if len(C)==N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

cnt = {}

for a_i in a:
    try:
        cnt[ a_i ]
        print( "NO" )
        break
    except KeyError:
        cnt[ a_i ] = 1
else:
    print( "YES" )

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
# C - Distinct or Not
N = int(input())
A = list(map(int, input().split()))

M = len(set(A))

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

Submission status: Accepted

Solution code:
def distinct(a):
  d = {}
  for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
  for key in d:
    if d[key] > 1: return False
  return True
n = int(input())
a = list(map(int, input().split()))
print('YES' if distinct(a) else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

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

print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
dic = {}
for nums in a:
  if nums in dic:
    dic[nums] += 1
  else:
    dic[nums] = 1
ma = 0
for keys in dic:
  ma = max(ma,dic[keys])
if ma == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

b = [-1] + a

l = []
for i in range(n):
  l.append(a[i] - b[i])
  
if l.count(0) == 0:
  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(len(A)):
    if i == 0:
        continue
    if A[i-1] == A[i]:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N,*A = map(int, open(0).read().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()))
S = set(A)
if len(A) == len(S):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

A_set = list(set(A))

if len(A) == len(A_set):
    print("YES")

else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
for a in list(map(int, input().split())):
  dic[a] += 1
  if dic[a] >= 2:
    print('NO')
    exit()
print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt=Counter(a)

for k in cnt.values():
    if k != 1:
        print('NO')
        break
else:
    print('YES')

Submission status: Accepted

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

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:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n = k()
a = l()

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

Submission status: Accepted

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

dic = {}

for i in A:
    if i not in dic:
        dic[i] = 0
    dic[i] += 1
    
print("YES" if max(dic.values()) == 1 else "NO")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
di = {}
for i in range(N):
    if A[i] in di:
        di[A[i]] += 1
    else:
        di[A[i]] = 1
if max(di.values()) != 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N,*A = map(int, open(0).read().split())
ac = Counter(A)
if len(ac) == N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

for a in A:
    if a in B:
        print('NO')
        exit()
    else:
        B.add(a)
print('YES')

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split())
print('NYOE S'[len(set(a))==n::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(n-1):
    if c[i] == c[i+1]:
        ans +=1

if ans == 0:
    print('YES')
if ans != 0:
    print('NO')

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x 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()))

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)
if any(a[i] == a[i+1] for i in range(n-1)):
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
N = int(input())

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

C = defaultdict(int)

for a in A:
  C[a] += 1
  if C[a] >= 2:
    print('NO')
    sys.exit()

print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    N = I()
    A = LI()
    print("YES" if len(list(set(A)))==len(A) else "NO")


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

Solution code:
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n =INT()

a = LIST()

occ = defaultdict(int)

for el in a:
    occ[el]+=1
flag =0
for o in occ:
    if(occ[o]>1):
        flag = 1
        break
if(flag==1):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
if __name__ == '__main__':

	n = int(input())
	s = set(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
number = list(map(int,input().split()))
number_count = collections.Counter(number)
for i,j in number_count.items():
    if j >1:
        print("NO")
        exit(0)
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
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()) 
A=sorted(list(map(int,input().split())))
a=[]
for i in range(N-1):   
    if A[i]==A[i+1]:
        print("NO") 

        break
    elif i==N-2:print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

A_set = set(A)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(input())
a = [int(x) for x in input().split()]
d = set()
for i in a:
    if i in d:
        print("NO")
        exit()
    d.add(i)
print("YES")

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=sorted(A)
for i in range(N-1):
    if A[i+1]-A[i]==0:
        print('NO')
        exit()
print('YES')

Submission status: Accepted

Solution code:
from collections import Counter
from sys import exit

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

cnt = Counter(A)

for i in cnt.values():
    if i != 1:
        print("NO")
        exit(0)

print("YES")

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 = input()
A = list(int(x) for x in input().split())

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

d = defaultdict(int)
for i in a:
    d[i] += 1

for i in a:
    if d[i] > 1:
        print("NO")
        exit()

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:
#!/usr/bin/env python3
_, *a = open(0).read().split()
print("YNEOS"[len(a) != len({*a})::2])

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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")
    sys.exit(0)
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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


print("YES" if len(x) == len(a) else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
if len(np.unique(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)
count = 0

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

if count > 0:
  print('NO')
if count == 0:
  print('YES')

Submission status: Accepted

Solution code:
import math
import collections

def main():
  N = int(input())
  A = map(int, input().split())
  
  l = collections.Counter(A)
  
  for key,value in l.items():
    if value >= 2:
      print('NO')
      return
  print('YES')
    
    
  
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Distinct or Not
# https://atcoder.jp/contests/abc154/tasks/abc154_c

num = int(input())
p = list(map(int, input().split()))
list.sort(p)

ret = "YES"
for i in range(num-1):
    if p[i] == p[i+1]:
        ret = "NO"
        break

print("{}".format(ret))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A_set = set(A)

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

Submission status: Accepted

Solution code:
from collections import Counter

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

set_A = set(A)

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

Submission status: Accepted

Solution code:
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(' ')))
b={}
for i in range(n):
    if str(a[i]) in b:
        b[str(a[i])]+=1
    else:
        b[str(a[i])]=1

ok=1
for i in b:
    if b[i]>=2:
        ok=0
        break

if ok==0:
    print('NO')
else:
    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()))
a.sort()
c=0
for i in range(n-1):
    if a[i]==a[i-1]:
        print("NO")
        c+=1
        break
if c==0:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
As = list(map(int, input().split()))
def has_duplicates(seq):
    return len(seq) != len(set(seq))

if not has_duplicates(As):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

MAX = 0
A_map = {}
for i in range(N):
    num = A[i]
    A_map[num] = A_map.get(num,0) + 1
    MAX = max(MAX, A_map[num])

if MAX>=2:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
import sys
an = list(map(int, sys.stdin.readline().split()))

if len(set(an))==n:
    print('YES')
    exit(0)

print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter

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

for c in cnt.values():
    if c > 1:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

Solution code:
a=int(input())
b=input()
c=list(b.split(' '))
c.sort()
for i in range(0,len(c)-1):
    if c[i]==c[i+1]:
        print('NO')
        break
    if i==len(c)-2:
        print('YES')

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    inlis = list(map(int, input().split()))
    inset = set(inlis)

    if len(inlis) == len(inset):
        print("YES")
    else:
        print("NO")
    
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

for a in A:
    if a in s:
        print('NO')
        break
    s.add(a)
else:
    print('YES')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A.sort()
count = 0
di = A[0] + 111
for i in A:
    if di != i:
        count += 1
    di = i
if count == N:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mod = int(1e9+7)
def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c

def main():
    n = int(raw_input())
    
    arr = [int(x) for x in raw_input().split()]
    
    s = set(arr)
    
    if len(s) == len(arr):
        print('YES')
    else:
        print('NO')
    

main()

Submission status: Accepted

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

Submission status: Accepted

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

st = set(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N=int(input())
A=list(map(int,input().split()))
a=collections.Counter(A).most_common()
print("YES" if a[0][1]==1 else "NO")

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

a_s = set()
for a in al:
    if a in a_s:
        print('NO')
        break
    a_s.add(a)
else:
    print('YES')

Submission status: Accepted

Solution code:
import sys
n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for i in range(n):
  if(i == n-1):
    continue
  elif(l[i] == l[i + 1]):
    print('NO')
    sys.exit()
print('YES')

Submission status: Accepted

Solution code:
i=input;print(['NO','YES'][int(i())==len(set(i().split()))])

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans='YES'
a.sort()
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(v) for v in input().split()]
check=1
a.sort()
for i in range (0,n-1):
    if a[i]==a[i+1]:
        check=0
        break
if check==0:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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