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

counter = 0
for i in range(N):
    for j in range(N):
        if A[i] == A[j]:
            counter += 1

#print(counter)
if counter > N:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
A.sort()
for i in range(1, len(A)):
    if A[i - 1] != A[i]:
        k = True
    else:
        k = False
        break

if k:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

k = Counter(A)

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

Submission status: Wrong Answer

Solution code:
import sys

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

d = {}

for i in range(n):
  if a[i] not in d.keys():
    d[a[i]] = 1
  else:
    print('NO')
    sys.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())

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

an.sort()

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

an.sort()

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

else :
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())

an = map(int, input().split())

an = list(an)

if len(set(an)) == n :
    print("Yes")

else :
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

if len(set(an)) == len(an) :
    print("Yes")

else :
    print("No")

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
acount = Counter(a)
if n == (len(list(acount.keys()))):
         print("Yes")
else:
         print("No")

Submission status: Wrong Answer

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

K = collections.Counter(A)
B = len(K)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
print('Yes' if len(set(A)) == N else 'No')

Submission status: Wrong Answer

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

def check():
  for s in num:
    if(num.count(s) >= 2):
      print("No")
      return
  print("Yes")

check()

Submission status: Wrong Answer

Solution code:
import collections
a=int(input())
b=list(map(str,input().split()))
n=[]
for i in b:
    x=i.replace(' ',',')
    n.append(x)
c=collections.Counter(n)
n,values=zip(*c.most_common())
d=list(values)
print(d)
if d.count(1)==a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import collections
a=int(input())
b=list(input())
b.remove(' ')
c=collections.Counter(b)
n,values=zip(*c.most_common())
d=list(values)

if d.count(1)==a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import collections
a=int(input())
b=input()
c=collections.Counter(b)
n,values=zip(*c.most_common())
d=list(values)
del d[0]
if d.count(1)==a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import collections
import sys
N = input()
A = input().split()
A1 = map(int,collections.Counter(A).values())
for i in A1:
    if i >= 2:
        print('No')
        sys.exit()
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Solution code:
n = int(input())
a = list(map(int, input().split()))
d = dict()
for i in range(n):
    d.setdefault(a[i])
if len(d) != n :
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
list=[]
for i in a:
	if a in list:
		print("NO")
		break
	list.append(a)
else:
	print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
arr=list(map(int,input().split()))
dic={}
for i in range(n): #各単語の出現回数を数える
  if arr[i] not in dic:
    dic[arr[i]]=1
  else:
    dic[arr[i]]+=1
largest=max(dic.values()) #最大の出現回数を求める
if(largest>=2):
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in 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:
from collections import Counter
n = int(input())
if(sorted(Counter([i for i in input().split()]).most_common(), key=lambda x: x[1])[0][1] > 1):
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
if(sorted(Counter([i for i in input().split()]).most_common())[0][1] > 1):
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
if(sorted(Counter([i for i in input().split()]).most_common())[0][1] > 1):
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
input();a=str(input());print("NYOE S"[len(a.replace(" ",""))==len(set(a))-1::2])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split(" ")))
deta = []
error = False

for i in range(n):
    if n == 0:
        pass
    elif n>=100000:
        error=True
    elif error:
        break
    elif a[i] in deta:
        error = True
        break
    deta.append(a[i])
if error:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split(" ")))
deta=[]
error=False
    
for i in range(n):
    if len(deta)==0:
        pass
    elif error:
        break
    elif a[i] in deta:
        error=True
    deta.append(a[i])
if error:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split(" ")))
deta=[]
error=False

for i in range(n):
  if len(deta)==0:
    pass
  elif error:
    break
  elif a[i] in deta:
    error=True
    deta.append(a[i])
if error:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split(" ")))
deta=[]
error=False

for i in range(n):
  if len(deta)==0:
    pass
  elif error:
    break
  elif a[i] in deta:
    error=True
    deta.append(a[i])
  if error:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int,input().split()))
ans = "Yes"
judge = 0
for i in range(N-1):
  for j in range(i+1,N):
    if(a[i]==a[j]):
      judge += 1
      ans = "No"
      break
  if(judge>0):
    break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
stdin = open(0).read().split('\n')
N = int(stdin[0])
A = list(map(int,stdin[1].split()))
B = set(A)
print('Yes' if len(A)==len(B) else'No')

Submission status: Wrong Answer

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

s = set(A_list)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

S=set(L)

if n==len(S):
	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()))
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()))
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()))
a_2 = set(a)
if len(a) == len(a_2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#154 Distinct or not
n = int(input())
a = list(map(int,input().split()))
b = len(set(a))

print(len(a),b)

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

Submission status: Wrong Answer

Solution code:
#154 Distinct or not
n = int(input())
a = list(map(int,input().split()))
b = set(a)

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

Submission status: Wrong Answer

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

Solution code:
import sys
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')
      sys.exit()
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
A=input().split()
S=[int(a) for a in A]
n=0
NN=[]
for b in S:
    if not b in NN:
        NN.append(b)
if len(NN)==N:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a.sort()

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

Submission status: Wrong Answer

Solution code:
from collections import Counter
import sys

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

C = dict(Counter(A))
for a in C:
    if C[a] > 1:
        print('No')
        sys.exit()
print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().split()
for i in range(n):
  for j in range(i+1, n):
    if s[i] == s[j]:
      break
      print('No')
    elif i == n:
      print('Yes')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
la = len(A)
B = set(A)
lb = len(B)
if la == lb:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def judge(s):
  s=sorted(s)
  t=list(set(s))
  if s==t:
    return "YES"
  else:
    return "NO"

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
dic = {}
for i in range(n):
	try:
		dic[a[i]] += 1
	except:
		dic[a[i]] = 1
if max(dic.values()) > 1:
	print("No")
else:
  	print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
dic = {}
for i in range(n):
	try:
		dic[a[i]] += 1
	except:
		dic[a[i]] = 1
if max(dic.values()) > 1:
	print("Yes")
else:
  	print("No")

Submission status: Wrong Answer

Solution code:
# N = 5
# ARR = [2, 6, 1, 4, 5]

# N = 6
# ARR = [4, 1, 3, 1, 6, 2]
#
#
# N = 2
# ARR = [10000000, 10000000]

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

def calculate(n,arr):

    dict = {}
    result = True
    for i in range(n):
        item = arr[i]
        if dict.get(item) == None:
            dict.__setitem__(item,True)
        else:
            result = False
            break
    if result == True:
        print("Yes")
    else:
        print("No")

calculate(N,ARR)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

A = list(map(int,input().split()))
li = []
flag = False
for a in A:
    if a in li:
        flag = True
    else:
        li.append(a)
if flag:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = sorted(readInts())
    dic = {}
    for a in A:
        if a in dic:
            print('No')
            exit()
        else:
            dic[a] = 1
    print('Yes')
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = sorted(readInts())
    dic = {}
    for a in A:
        if a in dic:
            print('No')
            break
        else:
            dic[a] = 1
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    A = sorted(readInts())
    setA = list(set(A))
    if setA == A:
        print('YES')
    else:
        print('NO')
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
s=input()
t=list(map(int,input().split()))
u=len(t)
v=len(set(t))

if u == v:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from  collections import Counter
n = int(input())
a_ = [int(x) for x in input().split()]
a = Counter(a_)
print(a)
print('NO') if a.most_common()[0][1]>1 else print('YES')

Submission status: Wrong Answer

Solution code:
N=int(input())
A=set(map(int,input().split()))
print('YNeos'[N!=len(A)::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()

A = FLI()

cnt = Counter(A)
flg = False
for a in A:
   if A.count(a) > 1:
      flg = True

if not flg:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()

A = FLI()
print(A)

cnt = Counter(A)
flg = False
for a in A:
   if A.count(a) > 1:
      flg = True

if not flg:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np
def f(n, a):
    if len(np.unique(a)) == n:
        print('YES')
    else:
        print('NO')

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

f(n, a)

Submission status: Wrong Answer

Solution code:
import numpy as np
def f(n, a):
    if len(np.unique(a)) == a:
        print('YES')
    else:
        print('NO')

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

f(n, a)

Submission status: Wrong Answer

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

B =list(set(A))

print('YES' if A == B else 'NO')

Submission status: Wrong Answer

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

x = 0

for i in range(n-1):
    if a[i] == a[i+1]:
        x += 1
        break
    else:
        x += 0
        
if x == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

l.sort()

print('Yes' if all([l[i]!=l[i+1] for i in range(n-1)]) else 'No')

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

s = {}
flag = 0

for i in range(n):
    t = a[i]
    s.setdefault(t, 0)
    if s[t] == 0:
        s[t] = 1
    else:
        print("No")
        flag = 1
        break

if flag == 0:
    print("Yes")

Submission status: Wrong Answer

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

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

for i in range(n):
  b=a.pop(0)
  if b in a:
    f=True
    break

if f:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = lr()
bl = len(set(A)) == N
print('Yes' if bl else 'No')

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
values,counts = zip(*c.most_common())
print(counts)
if counts[0] != 1:
    print('NO')
else :
    print('YES')

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
values,counts = zip(*c.most_common())
if counts[0] != 1:
    print('No')
else :
    print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
An = list(map(int,input().split()))
An.sort()
for i in range(N-1):
  if An[i] == An[i+1]:
    print("NO")
    sys.exit()
print("Yes")

Submission status: Wrong Answer

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

flag = True

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())
lis = list(map(int,input().split()))
x = 0
for i in range(N):
        for j in range(i+2,N):
                if lis[i] == lis[j]:
                        x = 1
                        break
if x == 0:
        print("YES")
else:
        print("NO")

Submission status: Wrong Answer

Solution code:
N= int(input())

A=sorted(list(input().split()))

print(A)

flag=1
for i in range(N-1):
  if A.count(A[i])>1:
    flag=0
    break
if flag==1:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(set(a))==len(a):
    print("Yes")
elif len(set(a))!=len(a):
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
A = list(map(int,input().split()))
ans = collections.Counter(A)
pr = 'YES'
for i in ans.values():
    if i > 0:
        pr = 'NO'
print(pr)

Submission status: Wrong Answer

Solution code:
def print_ans(N, ar):
    print(1)
if __name__ == '__main__':
    N = int(input().rstrip())
    ar = list(map(int,input().rstrip().split()))
    print_ans(N, ar)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import numpy as np

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a.sort()

for i in range(1,len(a)):
  if(a[i]==a[i-1]):
    print('No')
    break
    
else: print('Yes')

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
lis = list(input().split())
for i in lis:
  i = int(i)
  if i >1:
    print("NO")
    exit()
print("YES")

Submission status: Wrong Answer

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

def binary_search(A,n):
    find=False
    start=0
    end=len(A)
    if len(A)==1 and A[0]==n:
        find=True
    else:
        while find==False and start<end-1:
            middle=(start+end)//2
            if n>A[middle]:
                start=middle
            elif n<A[middle]:
                end=middle
            else:
                find=True
    return find

l=[]
dup=False
for e in A:
    if binary_search(l,e):
        dup=True
        break
    else:
        l.append(e)
        l.sort()

if dup==False:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

def binary_search(A,n):
    find=False
    start=0
    end=len(A)
    if len(A)==1 and A[0]==n:
        find=True
    else:
        while find==False and start<end-1:
            middle=(start+end)//2
            if n>A[middle]:
                start=middle
            elif n<A[middle]:
                end=middle
            else:
                find=True
    return find

l=[]
dup=False
for e in A:
    if binary_search(l,e):
        dup=True
        break
    else:
        l.append(e)
if dup==False:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import collections

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

B=collections.Counter(A)

print("No" if len(A)!=len(B) else "Yes")

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
f=0
for i in c.values():
    if i>1:
        f+=1
        break
if f==1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

len2 = len(set(A))

if N == len2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

len2 = len(set(A))

if N == len2:
    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")

print("YES")

Submission status: Wrong Answer

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

def distinct_or_not(an):
    an_dict = {}
    for a in an:
        if a in an_dict:
            return False
        else:
            an_dict[a] = 1
    return True
  
if distinct_or_not(an):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

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

print(answer)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if max(d.values()) >= 2:
    print('No')
else:
    print('Yes')