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:
d1 = int(input())
d = input().split()
d2 = [int(x) for x in d]
count=0
d2.sort()
for x in range(d1-1):
    n = x+1
    if d2[x]==d2[n]:
        count+=1
        print("NO")

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
a=int(input())
b=list(map(int,input().split()))
c=0
for i in range(a):
  
  for j in range(a-1):
    if i>=a-1 :
      break
    else:  
      if b[i]==b[i+1]:
        print('NO')
        sys.exit()
    
    
print('YES')

Submission status: Wrong Answer

Solution code:
import sys
import collections

N = int(input())
A_i = list(map(int, input().split()))
A_i = [i for i in A_i if 1 <= i and i <= 10**9]

if not 2 <= N or not N <= 2*10**5:
    print("error:N")
    sys.exit()
if len(A_i) != N:
    print("error")
    sys.exit()

if len(collections.Counter(A_i)) == len(A_i):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if int(s) == len(set(a)):
  print("YES")
else:
  print("NOr")

Submission status: Wrong Answer

Solution code:
import numpy as np
 
n = int(input())
a = list(input().split())

a.sort()

# print(a)
 
ans = "YES"

def split(o_array):
  add = 0
  if len(o_array) % 2 != 0:
    add = 1
  half = len(o_array) // 2
  
  al = o_array[:half + add]
  ar = o_array[half + add:]

  return al, ar

def compare(c_array):
  a_ans = "YES"
  if len(c_array) != 1:
    if c_array[0] == c_array[-1]:
      a_ans ="NO"

  return a_ans

oa = a

stop = False

while not stop:
  al, ar = split(oa)
  # print(al, ar)
  if len(al) > 1 and compare(al) == "YES":
    oa = al
  elif len(al) > 1 and compare(al) == "NO":
    ans = "NO"
    stop = True
  else:
    stop = True
  if len(ar) > 1 and compare(ar) == "YES":
    oa = ar
    stop = False
  elif len(ar) > 1 and compare(ar) == "NO":
    ans = "NO"
    stop = True
  else:
    stop = True
  if al[-1] == ar[0]:
    ans = "NO"
    stop = True

if len(a) == 2:
  ans = compare(a)

print (ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
i=0
t=0
while(i<=n-2):
  A=a[i]
  if a.count(A)>1:
    t=+1
  i=i+1
if t==0:
  print("NO")  
else:
  print("YES")

Submission status: Wrong Answer

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

for i in range(N-1):
    for j in range(i+1, N):
        if A[i] == A[j]:
            count += 1
            
if count == 0:
    print("Yes")
    
else:
    print("No")

Submission status: Wrong Answer

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

def func1():
    S = set()
    for i in range(N):
        if A[i] in S:
            return False
        S.add(A[i])
    return True

if func1():
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
a = sorted(list(map(lambda x: int(x),input().split())))
for i in range(n - 1):
    if a[i] == a[i+1] :
        print('NO')
        sys.exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(len(data)):
  for j in range(1, len(data) - i):
    d1 = data[i]
    d2 = data[i+j]
    if (d1 == d2):
      print("No")
      sys.exit()()

print("Yes")

Submission status: Wrong Answer

Solution code:
import numpy as np
 
n = int(input())
a = list(input().split())

a.sort()

# print(a)
 
ans = "YES"

def split(o_array):
  add = 0
  if len(o_array) % 2 != 0:
    add = 1
  half = len(o_array) // 2
  
  al = o_array[:half + add]
  ar = o_array[half + add:]

  return al, ar

def compare(c_array):
  a_ans = "YES"
  if len(c_array) != 1:
    if c_array[0] == c_array[-1]:
      a_ans ="NO"

  return a_ans

oa = a

stop = False

while not stop:
  al, ar = split(oa)
  # print(al, ar)
  if len(al) > 1 and compare(al) == "YES":
    oa = al
  elif len(al) > 1 and compare(al) == "NO":
    ans = "NO"
    stop = True
  else:
    stop = True
  if len(ar) > 1 and compare(ar) == "YES":
    oa = ar
    stop = False
  elif len(ar) > 1 and compare(ar) == "NO":
    ans = "NO"
    stop = True
  else:
    stop = True

if len(a) == 2:
  ans = compare(a)

print (ans)

Submission status: Wrong Answer

Solution code:
import sys
import collections

N = int(input())
A_i = list(map(int, input().split()))
A_i = [i for i in A_i if 1 <= i and i <= 10**9]

if not 2 <= N or not N <= 2*10**5:
    print("error:N")
    sys.exit()

# print(len(collections.Counter(A_i))) # 重複しない要素の個数
if len(collections.Counter(A_i)) == len(A_i):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

c = [0]*n
flag = 0
c[0] = a[0]
for i in range(n):
  for j in range(i):
    if c[j] == a[i]:
      flag = 1
      break
  if flag == 1:
    break
  else:
    c[i] = a[i]

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

Submission status: Wrong Answer

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

print(n,a)

for f in range(n):
  
  for g in range(n):

    if g != f:
    	if a[f] == a[g]:
      		#print(a[f], a[g])
      		s = s+1
      
if s>0: print("NO")
else: print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
 
n = int(input())
a = list(input().split())

a.sort()

# print(a)
 
ans = "YES"

def split(o_array):
  add = 0
  if len(o_array) % 2 != 0:
    add = 1
  half = len(o_array) // 2
  
  al = o_array[:half + add]
  ar = o_array[half + add:]

  return al, ar

def compare(c_array):
  a_ans = "YES"
  if len(c_array) != 1:
    if c_array[0] == c_array[-1]:
      a_ans ="NO"

  return a_ans

oa = a

stop = False

while not stop:
  al, ar = split(oa)
  # print(al, ar)
  if len(al) > 1 and compare(al) == "YES":
    oa = al
  elif len(al) > 1 and compare(al) == "NO":
    ans = "NO"
    stop = True
  else:
    stop = True
  if len(ar) > 1 and compare(ar) == "YES":
    oa = ar
    stop = False
  elif len(ar) > 1 and compare(ar) == "NO":
    ans = "NO"
    stop = True
  else:
    stop = True

print (ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def func():
    return

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

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

'''
for i in range(n-1):
    for j in range(i+1, n):
        if a[i] == a[j]:
            print("NO")
            exit()
'''
'''
ans = [0]*(max(a)+1)
for ida in a:
    if ans[ida] > 0:
        print("NO")
        exit()
    ans[ida] += 1
'''

print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
A = 0
while A == N:
    if a.count(a[A]) == 1:
        A += 1
    else:
        print('NO')
        break
if A == N:
    print('YES')

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

def main():
    N, *A = map(int, read().split())
    for a in A:
        if A.count(a)==1:
            continue
        else:
            result = 'NO'
            return result
    else:
        result = 'Yes'
    return result

if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

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

if int(s) == len(set(a)):
  print("YESS")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = input()
input_line = input()
Ai = input_line.split(" ")
Comment = "Yes"
N = int(N)
#print(type(N))
for i in range(N):
  for j in range(i+1,N):
    if(Ai[i] == Ai[j]):
      Comment = "No"
      break
      
print(Comment)

Submission status: Wrong Answer

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

for i in range(len(data)):
  for j in range(1, len(data) - i):
    if (data[i] == data[i+j]):
      print("No")
      exit()

print("Yes")

Submission status: Wrong Answer

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

if int(s) == len(set(a)):
  print("YES")
else:
  print("NOO")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
i=0
t=0
while(i<=n-2):
  A=a[i]
  if a.count(A)>1:
    print("NO")
  i=i+1
if t==0:
  print("YES")

Submission status: Wrong Answer

Solution code:
n = input()
n = int(n)
l = input().split(" ")
s = set(l)


if len(s) == len(l):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(0,n):
		if a.count(a[i])>1:
			print("NO")
			exit()
	print("YES")

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
A = 0
while A == N:
    if a.count(a[A]) == 1:
        A += 1
    else:
        print('NO')
if A == N:
    print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = input()
input_line = input()
Ai = input_line.split(" ")
Comment = "Yes"
for i in range(int(N)):
  for j in range(i+1,int(N)):
    if(Ai[i] == Ai[j]):
      Comment = "No"
      break
      
print(Comment)

Submission status: Wrong Answer

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

B=sorted(A)

answer="YES"
for i in range(N):
  if B[i]==B[i+1]:
    answer="NO"
  break
  
print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
*l, = map(int, input().split())
def has_duplicates(seq):
    return len(seq) != len(set(seq))
S = has_duplicates(l)
if str(S) == 'False':
  print('NO')
elif str(S) == 'True':
  print('YES')

Submission status: Wrong Answer

Solution code:
import collections
n=int(input())
a=list(map(int,input().split()))
b=len(a)
c=collections.Counter(a)
e=len(c.values())
print(e)
if b==e:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
x = list(map(int, input().split()))
s = set()
list(map(s.add, x))
print(len(s))

Submission status: Wrong Answer

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

c = [0]*n
flag = 0
c[0] = a[0]
for i in range(n):
  for j in range(i):
    if c[j] == a[i]:
      flag = 1
      break
    else:
      c[i] = a[i]

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

Submission status: Wrong Answer

Solution code:
import collections
n=int(input())
a=list(map(int,input().split()))
b=len(a)
c=collections.Counter(a)
e=len(c.values())
print(e)
if b==e:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A = int(input())
array = list(map(int, input().strip().split()))
for i in range(0, A-1):
  for j in range(i+1, A):
    if i != j:
      if array[i] % array[j] or array[j] % array[i] == 0:
        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(n):
        if a[i] == a[j]:
            cnt += 1
if cnt > n:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

B=sorted(A)

answer="YES"
for i in range(0,N-1):
  if B[i]==B[i+1]:
    answer="NO"
  break
  
print(answer)

Submission status: Wrong Answer

Solution code:
A = int(input())
array = list(map(int, input().strip().split()))
for i in range(0, A):
  for j in range(0, A):
    if i != j:
      if array[i] % array[j] or array[j] % array[i] == 0:
        print("YES")
      else:
        print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

B=sorted(A)

answer="YES"
for i in range(0,N):
  if B[i]==B[i+1]:
    answer="NO"
  break
  
print(answer)

Submission status: Wrong Answer

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

for i in range(N-1):
 for j in range (i+1,N-2):
  if A[i]==A[j]:
   flag = 1
   break

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

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
A = list(input().split())
def has(s):
    return len(s) != len(set(s))
B = A
B = has(A) 
if B == False:
    print("NO")
    sys.stdout.flush
else:
    print("YES")
    sys.stdout.flush

Submission status: Wrong Answer

Solution code:
import collections
def resolve():
    N = int(input())
    A = list(map(int,input().split()))
    c = collections.Counter(A)
    C = max(c)
    ans = c.get(C)
    if ans > 1 :
        print('NO')
    else:
        print('YES')
resolve()

Submission status: Wrong Answer

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

A_set = set(A_list)
A_set_len = len(A_set)

if int(A_list_len) == int(A_set_len):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def has_no_duplicates(seq):
  return len(seq) == len(set(seq))

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

if has_no_duplicates==True:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int,input().split()))
def has_duplicates(seq):
    return len(seq) != len(set(seq))
if has_duplicates(P) == 'False':
    print('YES')
elif has_duplicates(P) == 'True':
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = collections.Counter(x)
# print(c)
w = c.values()
# print(w)
for i in w:
    # print(i)
    if i >= 2:
        print("No")
        break
    else:
        print("Yes")
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def has_no_duplicates(seq):
  return len(seq) == len(set(seq))

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

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

Submission status: Wrong Answer

Solution code:
N = input()
M = list(map(int,input().split()))
X = set(M)
Y = len(X)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N-2):
 for j in range (i+1,N-1):
  if A[i]==A[j]:
   flag = 1
   break

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

Submission status: Wrong Answer

Solution code:
import sys
a=int(input())
b=list(map(int,input().split()))
for i in range(a):
  for j in range(1,a):
    if b[i]==b[j]:
      print('NO')
      sys.exit()
print('YES')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

A_set = set(A_list)
A_set_len = len(A_set)

if A_list_len == A_set_len:
    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-1):
    for j in range(i-1):
        if A[i] == A[j+1]:
            print('NO')
            sys.exit()

print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=min(a)
M=max(a)
t=0
while(m<=M):
  if a.count(m)>1:
    m=M+2
    print("YES")
  else:
    m=m+1
if m==M+1:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
for i in A:
    try:
        if A[i] == A[i+1]-1:
            print("YES")
        else:
            print("NO")
    except:
        pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

flug = True
l = 0

for i in range(n-1):
    for j in range(n-1-l): 
        k = i+j+1
        flug = bool(s[i] == s[k])
        if flug == True:
            break
        print(s[i],s[k])
        print(flug)
    if flug == True:
        break
    l += 1



if flug == False:
    print('YES')

elif flug == True:
    print('NO')

Submission status: Wrong Answer

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

input_array = []

for x in A:
  input_array.append(x)

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

Submission status: Wrong Answer

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


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

cnt= len(A)
print(cnt)
cnts = 0
isYes = True

for i in A:
    if A.count(i) > 1:
        isYes = False
        break
    else:
        isYes = True
 
    if cnts == cnt:
        isYes = True
        break
    cnts += 1

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
a.sort()
tmp = 0
flag = True
for i in range(n):
    if a[i] == tmp:
        flag = False
        break
    tmp = a[i]

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    StringN    = input();
    listA      = input();
    newlistA   = listA.split();
    duplicateA = set(newlistA);

    if int(StringN) != len(newlistA):
        print('No');
        return 0;
    if int(StringN) == len(duplicateA):
        print('Yes');
    else :
        print('No');


main();

Submission status: Wrong Answer

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

for i in range(N):
 for j in range (i+1,N):
  if i==j:
   flag = 1
   break

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

Submission status: Wrong Answer

Solution code:
s = input().split()
s_set = set(s)
s_ans = list(s)

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

Submission status: Wrong Answer

Solution code:
a=input()
b=input()
N=int(a[0])
f=0
c=b.split()
c.sort()
for i in range(N-1):
    if(c[i] == c[i+1]):
        f=1
        break
if(f==1):
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
import heapq

N = int(input())
A = list(int(x) for x in input().split())
heapq.heapify(A)
com1 = heapq.heappop(A)
ans = True

for _ in range(N-1):
    com2 = heapq.heappop(A)

    if com1 == com2:
        ans = False
        break

    com1 = com2

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

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int,input().split()))
def has_duplicates(seq):
    return len(seq) != len(set(seq))
ans = has_duplicates(P)
if ans == 'True':
  print('YES')
if ans == 'False':
  print('NO')

Submission status: Wrong Answer

Solution code:
s = input().split()
s_set = set(s)
s_ans = list(s)

if len(s) == len(s_ans):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(input())
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(input().split())
def has(s):
    return len(s) != len(set(s))
B = has(A)

if B == False:
    print("NO")
    sys.stdout.flush
else:
    print("YES")
    sys.stdout.flush

Submission status: Wrong Answer

Solution code:
n = int(input())

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

count = 0

for index, a_item in enumerate(a):
    ab = a[index:].count(a_item)
    print(ab)
    if ab >= 2:
        count += 1
        break
        #print('NO')
       # break

# print('YES')
if count == 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import random
N=int(input())

A=random.sample(range(10**9), k=N)

for B in A:
    if B==B:
        x="NO"
    else:
        x="YES"
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def quick_sort(list):
    stand=list[0]
    over=[]
    same=[]
    under=[]
    for i in list:
        if(i>stand):
            over.append(i)
        elif(i<stand):
            under.append(i)
        else:
            same.append(i)
    
    if(len(over)>1):
        over=quick_sort(over)
    else:
        pass
    if(len(under)>1):
        under=quick_sort(under)
    else:
        pass

    return over+same+under

N=int(input())
A=list(map(int,input().split()))
A=quick_sort(A)
ans="Yes"
if(len(A)>1):
    for i in range(len(A)):
        if(A[i-1]==A[i]):
            ans="NO"
            break
        else:
            pass
else:
    pass
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
*l, = map(int, input().split())
L = sorted(l)
S = 0
for i in range(n):
  for l in range(n):
    if L[i] == L[l]:
      S = 1
if S == 0:
  print('YES')
elif S == 1:
  print('NO')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input();
    newlistA = listA.split();
    duplicateA = set(newlistA);

    if int(StringN) == len(duplicateA):
        print('Yes');
    else :
        print('No');


main();

Submission status: Wrong Answer

Solution code:
import math
import fractions

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

def ValueToBits(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res

def BitsToValue(arr):
    n = len(arr)
    ans = 0
    for i in range(n):
        ans+= arr[i] * 2**i
    return ans

def ValueToArray10(x, digit):
    ans = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        ans[digit-i-1] = now%10
        now = now //10
    return ans

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

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

a.sort()

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

Submission status: Wrong Answer

Solution code:
import itertools

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

for i in itertools.combinations(a,2):
	if i[0]==i[1]:
		print("No")
		exit()
		
print("Yes")

Submission status: Wrong Answer

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

flag = 0
for i in range(N-1):
    if A[i] != A[i+1]:
        flag = 0
    else:
        flag = 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(input().split())
c = 0
for i in range(N-1):
  num = A.count(A[i])
  if num>=2:
    break
  else:
    c += 1
if c == 0:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

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

L = []

for i in range(N):
  if A[i] not in L:
    L.append(A[i])
    if i == N-1:
      print('Yes')
  else:
    print('No')
    break

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()))
B = set(A)
if len(A)==len(B):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

r=has_duplicates(list)
print(r)

if(str(r)=="False"):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

X = set(M)
Y = len(X)

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

Submission status: Wrong Answer

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

flag = 0
for i in range(N-1):
    if A[i] != A[i+1]:
        flag = 0
    else:
        flag = 1

if flag == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(input())
ans="Yes"
for i in range(n):
  for j in range(n):
    if a[i]==a[j]:
      ans="No"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import random
N=int(input())

A=random.sample(range(1,10**9), k=N)

for B in A:
    if B==B:
        x="NO"
    else:
        x="YES"
        
print(x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int,input().split()))
def ans(a):
  return len(a) != len(set(a))
ans = ans(P)
if ans == 'True':
  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)
if c==len(A):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
def main():
  n = int(input())
  A = sorted([int(x) for x in input().split()])
  for i in range(n-1):
    if A[i] == A[i+1]:
      print("Yes")
      return 0
      break;
      
  print("No")
  return 0
          
if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
def main():

    n = int(input())
    num = [int(i) for i in input().split()]
    if len(num) <= 1:
        return "YES"
    else:
        for i in range(len(num)+1):
            if num[i] == num[i + 1]:
                return "YES"
            else:
                return "NO"
print(main())

Submission status: Wrong Answer

Solution code:
# C
import numpy as np
N = int(input())
A = list(map(int,input().split()))

All_diff=[A[i]-A[j] for i,j in zip(range(N),range(N)) if i<j]   

prod=np.prod(All_diff)

if prod > 0 or prod < 0:
    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:
a = int(input())
b = input().split()
mydict = {}
for i in range(len(b)):
    mydict[b[i]] = 1
print(mydict)
if len(mydict) == a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

flag = True

while flag:
    for i in range(N-1):
        for j in range(i+1, N):
            if A[i] == A[j]:
                print('No')     
                flag = False      
while flag:
    print('Yes')

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 = input()
A = input().split()
if N in A:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
# C - Distinct or Not

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