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: Wrong Answer

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

if len(nums) == N:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if N == len(set(A)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())

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


x = len(set(a))


if x == len(a):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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
    if i==N-2:
        print("Yes")

Submission status: Wrong Answer

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

cnt=Counter(A)
print("Yes" if all([i==1 for i in cnt.values()]) else "No")

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
from collections import Counter

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

c = Counter(a)
new = c.values()

#print(new)

for i in new:
    if i != 1:
        re = "No"
        break
    else:
        re = "Yes"

print(re)

#if re > 0:
    #print("No")
#else:
    #print("Yes")

Submission status: Wrong Answer

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

A = list(set(A))

if len(A) == n:
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

Solution code:
import copy

N = int(input())
list1 = list(map(int, input().split()))
list2 = copy.copy(list1)
list3 = set(list1)

x=len(list2)
y=len(list3)

if x==y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import copy

N = input()
list1 = list(map(int, input().split()))
list2 = copy.copy(list1)
list3 = set(list1)

x=len(list2)
y=len(list3)

if x==y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(n):
    for j in range(i + 1, n):
        if a[i] == a[j]:
            print("No")
            exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
num = int(input())
table = list(map(int, input().split()))
count = 0
list.sort(table)
for i in range(1, num-1):
    if num == 2:
        if table[i-1] == table[i]:
            count += 1
        else:
            continue
    elif table[i] == table[i+1] or table[i-1] == table[i]:
        count += 1
    else:
        continue
if count == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
num = int(input())
table = list(map(int, input().split()))
print(table)
count = 0
list.sort(table)
print(table)
for i in range(1, num-1):
    if num == 2:
        if table[i-1] == table[i]:
            count += 1
    elif table[i] == table[i+1] or table[i-1] == table[i]:
        count += 1
    else:
        continue
if count == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
num = int(input())
table = list(map(int, input().split()))
count = 0
list.sort(table)
for i in range(1, num-1):
    if table[i] == table[i+1] or table[i-1] == table[i]:
        count += 1
    else:
        continue
if count == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
num = int(input())
table = list(map(int, input().split()))
print(table)
count = 0
list.sort(table)
for i in range(num-1):
    if table[i] == table[i+1]:
        count += 1
    else:
        continue
if count == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

flag = True
A = sorted(A)
print(A)
for i in range(N-1):
  if A[i] == A[i+1]:
    flag = False
if flag:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

flag = True
for i in range(N):
  for j in range(i+1, N):
    if A[i] == A[j]:
      flag = False
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
import bisect
def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('Yes')
     else:
         print('No')
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if n == 6:
    print('YES')

Submission status: Wrong Answer

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

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

if n == 2:
    print('YES')

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

c = Counter(a)
new = c.values()

for i in new:
    if i > 1:
        re += 1

if re > 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

c = Counter(a)

for i in c.values():
    if i > 1:
        re += 1

if re > 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

from collections import Counter

c = Counter(a)

for i, v in c.items():
    if v >= 2:
        re += 1

if re >= 1:
    print("No")
else:
    print("Y")

Submission status: Wrong Answer

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

from collections import Counter

c = Counter(a)

for i, v in c.items():
    if v >= 2:
        re += 1

if re >= 1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
#b,c=int(input()),int(input())
# c=[]
#  for i in b:
#     c.append(i)
#e1,e2 = map(int,input().split())
A = list(map(int,input().split()))
#j = [input() for _ in range(a)]
# h = []
# for i in range(e1):
#     h.append(list(map(int,input().split())))
A.sort()
ans="Yes"
for i in range(1,N):
    if A[i-1]==A[i]:
        ans="NO"
        break
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
#b,c=int(input()),int(input())
# c=[]
#  for i in b:
#     c.append(i)
#e1,e2 = map(int,input().split())
A = list(map(int,input().split()))
#j = [input() for _ in range(a)]
# h = []
# for i in range(e1):
#     h.append(list(map(int,input().split())))
A.sort()
ans="Yes"
for i in range(1,N):
    if A[i-1]==A[i]:
        ans="NO"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = sorted([int(i) for i in input().split()])
ans = 'Yes'
for i in range(1, n):
  if a[i-1] == a[i]:
    ans = 'No'
    break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = {i for i in input().split()}
print("Yes" if N==len(A) else "No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=int(input())
# b=input()
# c=[]
# for i in range(b):
#     c.append(a[i])
a = list(map(int,input().split()))
#b = list(map(int,input().split()))

c = {i for i in a}  

if a==s:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s=int(input())
# b=input()
# c=[]
# for i in range(b):
#     c.append(a[i])
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
count=0
for i in range(s):
    for k in range(s):
        if  a[i]==a[k]:
            count+=1
        print(count)

if count<=s:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import heapq
n = int(input())
a = [int(x) for x in input().split()]
heapq.heapify(a)
bef = a[0]
for i in range(1,n):
    if bef == a[i]:
        print("NO")
        break
    bef = a[i]
    if i == n-1:
        print("YES")

Submission status: Wrong Answer

Solution code:
import heapq
n = int(input())
a = [int(x) for x in input().split()]
k = 0
heapq.heapify(a)
bef = a[0]
for i in range(1,n):
    if bef == a[i]:
        print("NO")
        k = 1
    bef = a[i]
    if i == n-1 and k == 0:
        print("YES")

Submission status: Wrong Answer

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

for i in A:
    if i in d:
        print("No")
        exit(0)
    else:
        d[i] = 1

print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
 
# Aのどの2つの要素も互いに異なること ⇔ 重複しない要素の個数がN
# 上記の事実を用いずに考えると・・・N=10^5なので、O(N)で解く
# 二重ループはO(N^2)なので間に合わない

# 数列に等しい値がある場合、ソートしたとき、隣接する場所に値が集まる
# まずソートし、全ての隣接する2項を比較すればよい
A = sorted(A)

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

Submission status: Wrong Answer

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

if N == len(set(A)): print('Yes')
else: print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(a)==n:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

c=[]

for i in x:
    if i not in c:
        c.append(i)
    else:
        print('No')
        sys.exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
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: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
l=[]
for i in range(N):
    if A[i] in l:
        print('No')
        exit()
    l.append(A[i])
print('Yes')

Submission status: Wrong Answer

Solution code:
n= int(input())
che={}
ans='Yes'
a = list(map(int, input().split()))
for i in a:
  if i in che.keys():
    ans='No'
  else:
    che[i]=0
print(ans)

Submission status: Wrong Answer

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

cnt=0
for i in range(n):
    for j in range(i+1,n):
        if A[i]==A[j]:
            cnt+=1
            break

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

Submission status: Wrong Answer

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

cnt=0
for i in range(n):
    for j in range(i+1,n):
        if A[i]==A[j]:
            cnt+=1

if cnt>1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

cnt=0
for i in range(n):
    for j in range(i+1,n):
        if A[j]!=A[i]:
            cnt+=1

if cnt>1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

cnt=0
for i in range(n):
    for j in range(i+1,n):
        if A[j]!=A[i]:
            cnt+=1
print(cnt)
if cnt>1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
for i in range(n-1):
    if a[i] == a[i+1]:
        print("No")
        exit()
print(("Yes"))

Submission status: Wrong Answer

Solution code:
n =input()
m = list(map(int,input().split()))
if len(m) == len(list(set(m))):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in a:
    if a.count(i) >= 2:
        print("NO")
        
print("YES")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
def has_duplicates2(seq):
    seen = []
    unique_list = [x for x in seq if x not in seen and not seen.append(x)]
    return len(seq) != len(unique_list)
print("YES" if has_duplicates2(a) else "NO")

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=list(dict.fromkeys(A))
if A==B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(1, N):
  if A[i-1] == A[i]:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('No')
        	return
        Set.add(i)
    print('Yes')
    return
main()

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
if N != len(set(list(map(int,input().split())))):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

if len(a)  == len(set(a)):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
m = list(map(int,input().split()))
if len(set(m)) == len(m):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
from collections import Counter
if max(Counter([int(x) for x in input().split()]).values())==1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
from collections import Counter
if max(Counter([int(x) for x in input().split()]).values())==1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    print("Yes" if len(A) == len(set(A)) else "No")

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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


S={}
ans="Yes"
for p in P:
    if p in S:
        ans = "No"
        break
    else:
        S[p]=1

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
table=list(map(int,input().split()))
for i in range(n):
    for j in range(n):
        if (table[i]==table[j]) and (i!=j) :
            print("No")
            exit()
print("Yes")

Submission status: Wrong Answer

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: Wrong Answer

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

if len(set(A)) == len(A):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
nn = str(input())
aa = list(map(int,input().split()))
#print(aa)
aa.sort()
#print(aa)

flag = 0

for i in range(len(aa)-1):
    if aa[i] == aa[i+1]:
        print('NO')
        flag = 1

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

Submission status: Wrong Answer

Solution code:
n = str(input())
aa = list(map(int,input().split()))
#print(aa)
aa.sort()
#print(aa)

for i in range(len(aa)-1):
    if aa[i] == aa[i+1]:
        print('YES')

print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=input().split()
l=len(set(A))
print('Yes' if N==l else 'No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.sort()
tmp = 0
for i in range(n-1):
    if a[i]==a[i+1]:
        tmp = 1
        break
if tmp == 1:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

l.sort()

for i in range(n-1):
  if l[i] == l[i + 1] :
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=[]
p=True
for a in A:
  if a in B:
    p = False
    break
  else:
    B.append(a)
print("Yes" if p else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
Ans = "Yes"
List = []

for e in A:
    if e in List:
        Ans = "No"
        break
    else:
        List.append(e)

print(Ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
k=set(l)
if n==len(k):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

n = inp()
a = inpl()

ans = 'Yes'
d = defaultdict(int)
for i in a:
    if d[i] == 1:
        ans = 'No'
        break
    d[i] += 1

print(ans)

Submission status: Wrong Answer

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

from collections import Counter
b = Counter(a)

for i in b.values():
    if i>1:
        print('NO')
else:
    print('YES')

Submission status: Wrong Answer

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

cnt = dict()
for i in range(N):
    cnt[A[i]] = cnt.get(A[i], 0) + 1

if max(cnt.values()) > 1:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

    for i in range(n):
        num = nums[i]
        if num in s:
            result = 'NO'
            break
        s.add(num)

    return result


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if(len(l1)==len(set(l1))):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if(len(l1)==len(set(l1))):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N,*a = map(int,open(0).read().split())
a.sort()
flag = True
for i in range(1,N):
  if a[i]==a[i-1]:
    print('No')
    flag=False
    break
if flag ==True:
  print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
li=sorted(list(map(int,input().split())))
bef=-1

for i in li:
  if bef==i:
    print("NO")
  bef=i
else:
  print("YES")

Submission status: Wrong Answer

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

li = collections.Counter(a)

li2 = [i for i in li.values()]

if max(li2)==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

cout = collections.Counter(lsA)
ans = 'Yes'
for i in cout.values():
    if i > 1:
        ans = 'No'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for x in range(N-1):
  if A[x]==A[x+1]:
    ans += 1
    break
if ans==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
N = int(input().strip())
array = list(map(int, input().strip().split()))
ret = True

for i in range(N):
    for j in range(i + 1, N):
        print(array[i], array[j])
        if array[i] == array[j]:
            ret = False
            break
    if ret == False:
        break

print("Yes" if ret == True else "No")

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
print(['No','Yes'][int(len(set(A))==len(A))])

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
print(['No','Yes'][(len(set(A))==len(A))])

Submission status: Wrong Answer

Solution code:
n = int(input())
arr = input().split()
print("Yes" if len(arr) == len(set(arr)) else "No")

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

a_n = sorted(a_n)
ans ='Yes'

for i in range(n-1):
  if a_n[i] == a_n[i+1]:
    ans = 'No'
    break
print(ans)

Submission status: Wrong Answer

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

a_n = sorted(a_n)
ans ='Yes'

for i in range(len(a_n)-1):
  if a_n[i] == a_n[i+1]:
    ans = 'No'
    break
print(ans)

Submission status: Wrong Answer

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

a_n = sorted(a_n)
ans ='Yes'
for idx_start,a1 in enumerate(a_n):
  cnt = 0
  for idx_imm, a2   in enumerate(a_n,start=idx_start):
    if a1 == a2:
      cnt  +=1
    if cnt > 1:
      ans = 'No'
      break
  
  if ans == 'No':
    break
print(ans)

Submission status: Wrong Answer

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

len_b = len(b)

flag = 0

for i in range(len_b):
    for j in range(len_b):
        if i==j:
            None
        elif b[i] != b[j]:
            #print("YES")
            flag = 0
        else:
            flag = 1
            #print("NO")
      
if flag == 0:
    print('YES')
elif flag ==1:
    print("NO")

Submission status: Wrong Answer

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

if len(a) == len(set(a)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
b = [0 for _ in range (max(a)+1)]
for i in a:
    b[i]+=1
    if b[i]==2:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[]
flag=True
for i in range(n):
  if a[i] in b:
    flag=False
    break
  else:
    b.append(a[i])
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(str,input().split()))
ans = 'Yes'
for i in range(n):
    if a.count(a[i]) != 1:
        ans = 'No'
        break
print(ans)

Submission status: Wrong Answer

Solution code:
print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(n):
  a = l.count(l[i])
  if (a != 1):
    print('N0')
    sys.exit()
print('YES')

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:

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

if len(A) == len(set(A)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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)