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 = [int(e) for e in input().split()]
B = 0
for i in range(N):
    for j in range(N-i-1):
        if A[i] == A[i+j+1]:
            print('No')
            B = 1
            break
        else:
            continue
        break
    
    
    if i == N-1 and B != 1:
        print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = int(input())
A = input()
z = ''
arr1 = [i for i in A.split(' ')]
for i in range(S):
	for j in range(i+1, S):
		if(arr1[i]==arr1[j]):
			z = 'YES'
			break
if(z=='YES'):
	print(z)
else:
	print('NO')

Submission status: Wrong Answer

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

A.sort()

isSame = False

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

Submission status: Wrong Answer

Solution code:
count = input()
l = input().split()
l.sort()
for i in range(int(count)-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()))

ans=0
for i in range(max(a)+1):
    if(a.count(i)>1):
        ans=1
        break
if(ans==0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if len(a) is len(s):
    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')
else:
    print('No')

Submission status: Wrong Answer

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

def check(seq):
    if len(seq) != len(set(seq)):
        return "YES"
    else:
        return "NO"

print(check(A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
	n=int(input())
	a=list(map(int, input().split()))
	count=[0]*n
	while sum(count)==n:
		for i in range(n):
			count[i] = a.count(a[i])
	if sum(count)==n:
		print('YES')
	else:
		print('NO')
main()

Submission status: Wrong Answer

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

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

if f==1:
    print("YES")

Submission status: Wrong Answer

Solution code:
len1 = input()
len2 = set(input().split(" "))
if len1 == len2:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

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


def main():
  n = int(input())
  x = tuple(map(int, input().split()))
  length = len(x)
  if n == length:
    print('YES')
  else:
    print('NO')
  

if __name__ == '__main__':
  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:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
len1 = input()
len2 = set(input().split(" "))
if len1 == len2:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

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)):
            if num[i] == num[i + 1]:
                return "YES"
            else:
                return "NO"
print(main())

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input();
    newlistA = sorted(listA);

    for i in range(int(StringN)-1):
        if newlistA[i] == newlistA[i+1]:
            print('No');
            return 0;
        else:
            print('Yes');
            return 0;


main();

Submission status: Wrong Answer

Solution code:
#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
#どっかで最悪計算量の入力データを用意する関数を作ろう？
def worstdata():
    a=0
    return a
#solution:
def comp(p):#期待値
    return ((p+1)/2)



#input
n,=(pin())
S=sorted(list(pin()))
cond=1
for i in range(1,n):
    if S[i]-S[i-1]==0:
        cond=0
        break

Submission status: Wrong Answer

Solution code:
n = int(input())
A = list(map(int, input().split()))
dic = {}
print(len(A))
j = True

for i in range(0, len(A)):
  if str(A[i]) in dic:
    print("NO")
    j = False
    break
  else:
    dic.setdefault(str(A[i]), A[i])

if j:
  print("YES")

Submission status: Wrong Answer

Solution code:
a=int(input())
list_a = [int(x) for x in input().split()]
set_a = set(list_a)
list_b = list(set_a)

list_a.sort()
if list_a == list_b:
    print("YES")
else:
    print("NO")

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
        #print('NO')
       # break

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

Submission status: Wrong Answer

Solution code:
import numpy as np

N1 = int(input())
A = np.array(map(int, input().split()))
N2 = np.unique(A).size

if N1 == N2:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
#!/user/bin/env python
#pythonプログラムであることを示している

# -*- coding: utf-8 -*-
"""
このプログラムはPythonを書く際のテンプレとなっています。これをコピペしてコーディングを行なってください。
なお字下げしないこと！！
"""

__author_ = 'Maruta Yuzuha'
__version_ = '1.0.0'
__date__ = '2019/12/25'

def main():
    """
    ここでプログラムの解説を行う
     >>main()
    Hello world.
    0
    """
    N = int(input())
    A = input().split()
    B = []
    for i in A:
        if i in B:
            print('NO')
            break
        else:
            B.append(i)
           
    return 0

if __name__ == '__main__':
    #上記のifの記述によってこのスクリプトファイルが起動された時だけ実行する部分になる。
    #ちなみにスクリプトが "モジュールとして"インポートされた時には実行されない、

    #単体テスト:モジュールのdocstring(ドキュメンテーション文字列)に記載された全ての対話実行例が書かれている通りに動作するかを確認
    #python ファイル名 -v
    import doctest
    doctest.testmod()

    #実際にmain()を呼び出して、結果を得て、その結果でPythonシステムを終える
    import sys
    sys.exit(main())

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input();
    newlistA = sorted(listA);

    for i in range(len(newlistA)-1):
        if newlistA[i] == newlistA[i+1]:
            print('No');
            return 0;
        else:
            print('Yes');
            return 0;


main();

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
A.sort()
frag = None
for i in range(N-1):
  if A[i] ==A[i+1]:
    print('NO')
    frag = 1
    break
if frag == None:
  print('Yes')

Submission status: Wrong Answer

Solution code:
N=input()
An = input()
list_An=[]
a = 0
for i in range(len(An)):
    if An[i]==" ":
        list_An.append(An[a:i])
        a = i
list_An.append(An[a+1:len(An)])
A =0
for i in range(len(list_An)):
    for j in range(len(list_An)):
        if list_An[i]==list_An[j]:
            A+=1
if A == len(list_An)+2:
    print("YES")
else:
    print("NO")

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:
N = int(input())
lisA = [int(i) for i in input().split()]
if len(set(lisA)) == len(lisA):
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
arr = [int(n) for n in input().split()]
_set = set(arr)
print("YES") if n in arr and arr[n-1] == n and len(_set) == len(arr) else print("NO")

Submission status: Wrong Answer

Solution code:
def main():
	n=int(input())
	a=list(map(int, input().split()))
	count=[0]*n
	for i in range(n):
		count[i] = a.count(a[i])
	if sum(count)==0:
		print('YES')
	else:
		print('NO')
main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
def main():
    listA = input();
    newlistA = sorted(listA);

    for i in range(len(newlistA)-1):
        if newlistA[i] == newlistA[i+1]:
            print('No');
            return 0;
        else:
            print('Yes');
            return 0;


main();

Submission status: Wrong Answer

Solution code:
import collections

N = int(input())
A = input().split(' ')

c = collections.Counter(A)

ans = all([True if v == 1 else False for k, v in c.items()])

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

Submission status: Wrong Answer

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

def checkIn(a):
    n_a = len(a)
    return (a[0] in a[1:n_a-1])

b = False
while(n > 1):
    if(checkIn(a)):
        print("NO")
        b = True
        break
    else:
        pass
    a = a[1:n]
    n = n-1

if(not b):
    print("YES")

Submission status: Wrong Answer

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

i=0
r="NO"

while(i<l):
  j=0
  while(j<l):
    if(i!=j):
      if(list[i]==list[j]):
        r="YES"
    j+=1
  i+=1

print(r)

Submission status: Wrong Answer

Solution code:
def main():

    n = int(input())
    num = [int(i) for i in input().split()]

    for i in range(len(num)):
        if num[i] == num[i + 1]:
            return "YES"
        else:
            return "NO"
print(main())

Submission status: Wrong Answer

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

cnt= int(len(A) / 2) + 1
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:
def has_duplicates(seq):
    return len(seq) != len(set(seq))

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

if has_duplicates(A) == True:
  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 a:
	for j in a[i:]:
		if i==j:
			cnt+=1
			break
		else:
			break

if cnt==0:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

a.sort()

print(a)

for i in range(len(a)-1):
    if(a[i] == a[i+1]):
        print("NO")
        break
    elif(i == len(a)-2):
        print("YES")

Submission status: Wrong Answer

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

dup = False
for i in a:
    if i in s:
        dup = True
    else:
        s.add(i)

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

Submission status: Wrong Answer

Solution code:
trash = input()
l = input().split()
l.sort()
for i in range(len(l)-1):
  if ( l[i] == l[i+1] ):
    print("No")
    exit()
print("YES")

Submission status: Wrong Answer

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

count = 'Yes'
for i in range(N-1):
    for j in range(N-1-i):
        if List[i] == List[i+1+j]:
            count = 'No'

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
flag = True
for i in range(n):
    tmp = a.pop(i)
    if tmp in a:
        flag = False
        break
    a.insert(tmp, i)
if flag:
   print("YES")
else:
    print("NO")

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) == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#!/user/bin/env python
#pythonプログラムであることを示している

# -*- coding: utf-8 -*-
"""
このプログラムはPythonを書く際のテンプレとなっています。これをコピペしてコーディングを行なってください。
なお字下げしないこと！！
"""

__author_ = 'Maruta Yuzuha'
__version_ = '1.0.0'
__date__ = '2019/12/25'

def main():
    """
    ここでプログラムの解説を行う
     >>main()
    Hello world.
    0
    """
    N = int(input())
    A = input().split()
    B = list(set(A))
    if N != len(B):
        print('No')
    else:
        print('Yes')
           
    return 0

if __name__ == '__main__':
    #上記のifの記述によってこのスクリプトファイルが起動された時だけ実行する部分になる。
    #ちなみにスクリプトが "モジュールとして"インポートされた時には実行されない、

    #単体テスト:モジュールのdocstring(ドキュメンテーション文字列)に記載された全ての対話実行例が書かれている通りに動作するかを確認
    #python ファイル名 -v
    import doctest
    doctest.testmod()

    #実際にmain()を呼び出して、結果を得て、その結果でPythonシステムを終える
    import sys
    sys.exit(main())

Submission status: Wrong Answer

Solution code:
num = int(input())
l = list(map(int,input().split()))
for i in l:
    if l.count(i) > 1:
        print('NO') 
print('YES')

Submission status: Wrong Answer

Solution code:
n,*a = map(int, open(0).read().split())

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

if has_duplicates(a) == True:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def checkIn(a):
    n_a = len(a)
    return (a[0] in a[1:n_a-1])

b = False
while(n > 2):
    if(checkIn(a)):
        print("NO")
        b = True
        break
    else:
        pass
    a = a[1:n]
    n = n-1

if(not b):
    print("YES")

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:
s = int(input())
l = [int(n) for n in input().split()]
l = sorted(l)
flag = 0

for i in range(len(l)- 1):
  if l[i] == l[i+1]:
    print("NO")
    flag = 1
    
if flag == 0:
  print("YES")

Submission status: Wrong Answer

Solution code:
import collections

N = int(input())
A = input().split(' ')

c = collections.Counter(A)

ans = all([True for k, v in c.items() if v == 1])

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

Submission status: Wrong Answer

Solution code:
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
Bool = len(numbers) != len(set(numbers))

if Bool == True:
    print("No")
else:
    print("YES")

Submission status: Wrong Answer

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

li0 = sorted(li)

print(li)
print(li0)

j = 0
for i in range(n):
  if li0[i-1]==li0[i]:
    j = 1

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

Submission status: Wrong Answer

Solution code:
import numpy as np

N1 = int(input())
A = np.array(map(int, input().split()))

N2 = np.unique(A).size

if A.size == N2:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
A = input().replace(' ', '')

fl = "YES"
for i, a in enumerate(A):
  if a in A[i+1:]:
    fl = "NO"
    break

print(fl)

Submission status: Wrong Answer

Solution code:

# 入力、宣言
intLen=int(input())
intList=sorted(list(map(int,input().split())))

result="Yes"

# 処理
# 対象項目と次の項目を比較
for i in range(len(intList)-1):
    if intList[i]==intList[i+1]:
        result="No"

# 出力
print(result)

Submission status: Wrong Answer

Solution code:
s = int(input())
l = [int(n) for n in input().split()]
l = sorted(l)
flag = 0
print(l)
for i in range(len(l)- 1):
  if l[i] == l[i+1]:
    print("NO")
    flag = 1
    
if flag == 0:
  print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while(len(A)!=0):
  if A.count(A[0]) !=0:
    print("NO")
    exit(0)
  A.pop(0)
  
print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt=len(A) / 2

cnts = 0
isYes = True

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

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

Submission status: Wrong Answer

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

A_line.sort()

res = "YES"
for i in range(len(A_line) - 2):
  if A_line[i] == A_line[i + 1]:
    res = "NO"

print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/user/bin/env python
#pythonプログラムであることを示している

# -*- coding: utf-8 -*-
"""
このプログラムはPythonを書く際のテンプレとなっています。これをコピペしてコーディングを行なってください。
なお字下げしないこと！！
"""

__author_ = 'Maruta Yuzuha'
__version_ = '1.0.0'
__date__ = '2019/12/25'

def main():
    """
    ここでプログラムの解説を行う
     >>main()
    Hello world.
    0
    """
    N = int(input())
    A = list(map(int, input().split()))
    B = list(set(A))
    if N != len(B):
        print('No')
    else:
        print('Yes')
           
    return 0

if __name__ == '__main__':
    #上記のifの記述によってこのスクリプトファイルが起動された時だけ実行する部分になる。
    #ちなみにスクリプトが "モジュールとして"インポートされた時には実行されない、

    #単体テスト:モジュールのdocstring(ドキュメンテーション文字列)に記載された全ての対話実行例が書かれている通りに動作するかを確認
    #python ファイル名 -v
    import doctest
    doctest.testmod()

    #実際にmain()を呼び出して、結果を得て、その結果でPythonシステムを終える
    import sys
    sys.exit(main())

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]==A[i+1]:
        print("NO")
        break
    else:
        print("YES")
        break

Submission status: Wrong Answer

Solution code:
s=int(input())
t=list(map(int,input().split()))
t.sort()
u=set(t)
if len(t)!=len(u):
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
all_num = int(input())
num_list = [int(i) for i in input().split()]

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

Submission status: Wrong Answer

Solution code:
n = int(input())
List = list(map(int, input().split()))
flag = True

for i in range(n):
    obj = List[i]
    for j in range(i+1, n - i - 1):
        if obj == List[j]:
            flag = False
        
if flag:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
arr = [int(n) for n in input().split()]
isTrue = True
print("YES") if n in arr and arr[n-1] == n else print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if C:
    print("YES")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N):
    a = A.pop(0)
    if a in A:
        print("No")
        break

if i == N-1:
    print("Yes")

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

count = 0

for a_item in a:
    ab = a.count(a_item)
    if ab <= 2:
        count += 1
        #print('NO')
       # break

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

Submission status: Wrong Answer

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

B = set(A)

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

Submission status: Wrong Answer

Solution code:
input()
words = input().split(" ")
for w in words:
  if words.count(w) >= 2:
    print("YES")
    exit()
print("NO")

Submission status: Wrong Answer

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

if a == li[a-1]:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
first_int = int(input())
secound_list = [int(k) for k in input().split()]

for k in range(first_int):
  if secound_list.count(secound_list[k]) >= 2:
    print('No')
    break
  if k == first_int-1:
    print('YES')

Submission status: Wrong Answer

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

count = 0
list00 = sorted(a)
for i in range(1, n):
  if a[i-1] == a[i]:
    count = count
  else:
    count = count + 1

if count == n-1:
  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-1):
  for j in range(i+1,n):
    if a[i]==a[j]:
      print("No")
      quit()
print("Yes")

Submission status: Wrong Answer

Solution code:
import sys

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

As.sort()
for i in range(N):
    for j in range(i + 1, N):
        if As[i] == As[j]:
            print('NO')
            sys.exit(0)
        if As[j] > As[i]:
            print('break!')
            break

print('YES')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = input()
a = input().split()

def has_duplicates(seq):
    return len(seq) != len(set(seq))
  
b = has_duplicates(a)
if b == True:
  print('YES')
if b == False:
  print('NO')

Submission status: Wrong Answer

Solution code:
S = int(input())
A = input()
arr1 = [i for i in A.split(' ')]
for i in range(S):
	for j in range(S):
		if(arr1[i]==arr1[j]):
			print('NO')
			break
print('YES')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
flag=0
 
for i in range(N): 
        for i1 in range(N): 
            if i != i1: 
                if A[i] == A[i1]: 
                    break
                else:
                  flag+=1
 
if flag>0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    A = set(map(int, input().split()))
    print(A)
    print(N, len(A))

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = int(input())
S   = input()
if num%2 == 0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
n=int(input())
li=list(map(int, input().split()))
ans="Yes"
for i in range(n):
  for j in range(i+1, n):
    if li[i]==li[j]:
      ans="No"
      break
  else:
    continue
  break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
if len(A) != len(set(A)):
    print("NO")
else:
    if A.count(N) == 1:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

flag = True
for i in range(N):
    target = A_list[i]
    for j in range(i+1, N):
        if target == A_list[j]:
            flag = False
            break
    if flag == False:
        break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input()
words = input().split(" ")
for i, w in enumerate(words):
  for ii, ww in enumerate(words):
    if i != ii and w == ww:
      print("YES")
      exit()
print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
s = input().split()
_set = set(s)
print(_set)
print(len(_set))
if int(n) == len(_set):
    print('Yes')
else:
    print('No')
# 被り文字をカウントする場合、集合を作り要素数をカウントする
# string[index]で文字を取る(インデクシング)できる。
# abc132A

Submission status: Wrong Answer

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

b_n = sorted(a_n)
flg = 0

for i in range(n - 1):
    if b_n[i] == b_n[i + 1]:
        flg = 1

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

Submission status: Wrong Answer

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

a.sort()
for i in range(len(a)-1):
    if(a[i] == a[i+1]):
        print("NO")
    elif(i == len(a)-1):
        print("YES")

Submission status: Wrong Answer

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

for i in range(n-1):
    for j in range(i+1, n-1):
        if a[i] == a[j]:
            is_same = True

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

Submission status: Wrong Answer

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

def has_duplicates(seq):
    if len(seq) != len(set(seq)):
        return 'YES'
    else:
        return 'NO'

print(has_duplicates(integers))

Submission status: Wrong Answer

Solution code:
num = int(input())
numbers_row = input().split(" ")
numbers = []
for i in numbers_row:
  numbers.append(int(i))
  
noBool = "YES"
 
for i, number in enumerate(numbers):
  for j in numbers[i+1:]:
    if j == number:
      noBool = "No"
      break
print(noBool)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
if len(A) != len(set(A)):
    print("NO")
else:
    if A.count(N) > 0:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split(' ')]
b = list(set(a))

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
NO = False
while NO == False:
    for i in A:
        j=0
        if A[j] == i:
            j += 1
            NO = True
if NO == True:
    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):
  if A.count(A[i]) !=0:
    count=count+1
if count==0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
from collections import Counter
from operator import itemgetter

N = int(input())
A = Counter(map(int,input().split()))
A1 = list(A.items())
A1 = sorted(A1,key=itemgetter(1),reverse = True)
print(A1)

if A1[0][1] == 1:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a=int(input())
list_a = [int(x) for x in input().split()]
set_a = set(list_a)
list_b = list(set_a)
if list_a == list_b:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
hoge = int(input())
n = list(map(int,input().split()))
ans = "YESt"
count = 0

for i in n :
    
    for j in n :
        if i == j :
            count += 1
    
    if count >= 2 :
        ans = "NO"
    
    count = 0

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import collections
c = collections.Counter(a)

flag = True
for i in c.values():
    #print(i)
    if i!=1:
        flag = False
        break
if flag == False:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

flag = False
for i in range(n-1):
    for j in range(i, n):
        if a[i] == a[j]:
            flag = True
            break
    if flag:
        break

print('NO' if flag else 'YES')

Submission status: Wrong Answer

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

def loop(n):
  for i in range(n):
    for j in range(i+1,n):
      if a[i]==a[j]:
        print('No')
        return
  print('Yes')

loop(n)

Submission status: Wrong Answer

Solution code:
N=int(input())
s=list(map(int,input().split()))
# N=6
# s=[4 ,1 ,3 ,1 ,6 ,2]


from collections import Counter
S=Counter(s)#カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})

if S.most_common(1)[0][1]==1:
    print("YES")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int, input().split()))
c=0
for i in range(n-1):
    for j in range(i, n):
        if a[i]==a[j]:
            c+=1
            break

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

Submission status: Wrong Answer

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

flag = False
for i in range(n-1):
    for j in range(i, n):
        if a[i] == a[j]:
            Flag = True
            break
    if flag:
        break

print('NO' if flag else 'YES')