Problem:


Score : 300 points

Problem Statement

Given is a sequence of integers A_1, A_2, ..., A_N.
If its elements are pairwise distinct, print YES; otherwise, print NO.

Constraints

2 ≤ N ≤ 200000

1 ≤ A_i ≤ 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

If the elements of the sequence are pairwise distinct, print YES; otherwise, print NO.

Sample Input 1

5
2 6 1 4 5

Sample Output 1

YES

The elements are pairwise distinct.

Sample Input 2

6
4 1 3 1 6 2

Sample Output 2

NO

The second and fourth elements are identical.

Sample Input 3

2
10000000 10000000

Sample Output 3

NO



Sample input:
5
2 6 1 4 5


Sample output:
YES

Submission status: Accepted

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

N = int(stdin.readline())
l = list(map(int, stdin.readline().rstrip().split()))
d = dict(Counter(l))
if(len(d) == N):
	print("YES")
else:
	print("NO")

Submission status: Accepted

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

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

print('YES')

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
dic={}
out=0

for num in a:
    if num in dic.keys():
        out=1
        break
    else:
        dic[num]=1

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

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

def qsort(seq):
	if len(seq) < 2:
		return seq
	else:
		beg, end = 0, len(seq) - 1
		mid = (beg + end) // 2
		smaller = [c for c in seq if seq[mid] > c]
		equal = [c for c in seq if seq[mid] == c]
		larger = [c for c in seq if seq[mid] < c]
		return (qsort(smaller) + equal + qsort(larger)) 

n = int(input())
a = qsort(list(int(i) for i in input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
inputA = input()
listA = inputA.split(' ')
listA.sort()
output = 'YES'
for i in range (len(listA) - 1):
    if listA[i] == listA[i + 1]:
        output = 'NO'
print(output)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n = input()
inp = input().split()

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

Submission status: Accepted

Solution code:
n = input()
n = input().split()
s=set()
f=True
for c in n:
	if c in s:
		print("NO")
		f= False
		break
	s.add(c)
if f:
	print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy
n=int(input())
a=list(map(int,input().split()))
b=copy.deepcopy(a)
a=list(set(a))
if len(a)!=len(b):
    print('NO')
else:
    print('YES')
#print(a,b)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    c = set(LI())
    if len(c) == n:
        return 'YES'

    return "NO"


print(main())

Submission status: Accepted

Solution code:
N = int(input())

#listで囲むと良い
A = list(map(int, input().split()))

#setは重複する値が消される
if len(set(A)) == N:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a_len = len(a)
a_unique = set(a)
a_unique_len = len(a_unique)

if a_len == a_unique_len :
    print('YES')
else :
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = {int(x) for x in input().split()}
if N == len(s):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
flag = True
n = int(input())

a = input().split()

a.sort()
start = 0
for i in a:
    for j in a[start-1:start+1:2]:
        if i == j:
            flag = False
            break
    start += 1
    
if flag:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

def merge(l) :
  length = len(l)
  
  if(length <= 1) :
    return 0, l
  
  flag, left = merge(l[0:int(length/2)])
  if(flag == 1) :
    return 1, l
  flag, right = merge(l[int(length/2):length])
  if(flag == 1) :
    return 1, l
  
  total = []
  while(True) :
    if(len(left) == 0) :
      total.extend(right)
      return 0, total
    if(len(right) == 0) :
      total.extend(left)
      return 0, total
    if(left[0] == right[0]) :
      return 1, l
    if(left[0] < right[0]) :
      total.append(left.pop(0))
    else :
      total.append(right.pop(0))
        
a.sort()
for i in range(0, len(a)-1) :
  if(a[i] == a[i+1]) :
    print("NO")
    exit()

print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
s = set()
for a in A:
    if a in s:
        print("NO")
        exit()
    else:
        s.add(a)
print("YES")

Submission status: Accepted

Solution code:
#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque


n = int(input())
a = [int(v) for v in input().split()]

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

Submission status: Accepted

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

d = {}
for x in a:
    if d.get(x, 0) == 0:
        d[x] = 1
    else:
        print("NO")
        exit(0)
print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
line1 = input()
line2 = input()
num_list = line2.split(" ")

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

Submission status: Accepted

Solution code:
input1 = int(input())
input2 = list(input().split())

input2 = set(input2)


if input1 == len(input2):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a.sort()

ans="YES"

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
As=[int(i) for i in input().split()]

if len(list(set(As)))!=len(As):
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

num_dic = {}

for ele in lis:
    if ele not in num_dic:
        num_dic[ele] = 1
    else:
        num_dic[ele] += 1
        
if max(num_dic.values()) == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def has_duplicate(array):
  return len(array) != len(set(array))

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

for num in numbers:
  num = int(num)
if has_duplicate(numbers):
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
l1 = len(a)
dic = Counter(a)
l2 = len(dic)
if l1 == l2:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
result = 'YES' if n == len(set(a)) else 'NO'
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
#リスト内包表記[式 for 任意の変数名 in イテラブルオブジェクト]
myset=set() 
#ここでは空の集合を作っている
for a in A:
  if a in myset:
    print('NO')
    exit()
  else:
    myset.add(a)
print('YES')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

convert_str = set(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
mySet = set()
for i in A:
  if i in mySet:
    print('NO')
    exit()
  else:
      mySet.add(i)
print('YES')

Submission status: Accepted

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

value=True
for i in range(1,len(li)):
  if li[i]==li[i-1]:
    value=False
    break
if value:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
a = sorted(a)
for i in range(n-1):
    if a[i] == a[i+1]:
        print('NO')
        exit(0)
print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

numList = list(map(int, input().split()))
numList.sort()

ans = "YES"

for z in range(N-1):
  if numList[z] == numList[z+1]:
    ans = "NO"
    break
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_count = int(input())

input_line = list(input().split())
input_len = len(input_line)
input_set = len(set(input_line))

if input_len == input_set:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = list(int(x) for x in input().split())
x = 0
 
a.sort()
for i in range(n-1):
    if a[-1] - a[-2] == 0:
        print("NO")
        x = 1
        break
    a.pop()
 
if x == 0:
    print("YES")

Submission status: Accepted

Solution code:
a=int(input())
numbers =input().rstrip().split(" ")
#print(numbers)
delta=list(set(numbers))
b=len(delta)
if b==a:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
aaa = int(input())
la = list(map(int, input().split()))
d = {}
ret = 'YES'
for a in la:
    if a in d:
        ret = 'NO'
        break
    d[a] = ''
print(ret)

Submission status: Accepted

Solution code:
N = int(input())
a = [""]*N

text = input()
k = 0
for x in text:
    if x == " ":
        k = k+1
    else:
        a[k] = a[k]+x

dic ={}
def judge():
    for i in range(N):
        if (a[i] in dic.keys())==True:
            return "NO"
        else:
            dic[a[i]] = 1
    return "YES"

print(judge())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c=b.copy()
c=set(c)
if len(b)==len(c):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n=int(input())
xx=input().split()
x=[]
for k in range(len(xx)):
  x.append(int(xx[k]))
x=sorted(x)
ok='YES'
for k in range(len(x)-1):
  if x[k]==x[k+1]:
    ok='NO'
    break
print(ok)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = 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: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = []

tmp = input().split()

for i in range(N):
  A.append(int(tmp[i]))
    
A.sort()

hantei = True

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

Submission status: Accepted

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

if point == len(A)-1:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
List = list(map(int, input().split()))
Sorted = sorted(List)
ans = 'YES'
for i in range(n - 1):
    if Sorted[i] == Sorted[i + 1]:
        ans = 'NO'
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(n, a):
    return "YES" if len(set(a)) == n else "NO"

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

dd=defaultdict(int)

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

for i in arr:
    dd[i]+=1

if max(dd.values())>1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
x=list(map(int,input().split()))
x.sort()
v=x[0]
y=True
for i in range(1,len(x)):
  if v==x[i]:
    y=False
    break
  else:
    v=x[i]
    
if y==True:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
dic = defaultdict(lambda : 0)
N = int(input())
A = [int(x) for x in input().split()]
for x in A:
  if dic[x] == 1:
    print("NO")
    exit()
  else:
    dic[x] = 1
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

A.sort()
i = 0
while i<N-1:
    if A[i]==A[i+1]:
        print('NO')
        sys.exit()
    else:
        i = i+1
print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_length = int(input())
length = len(list(set([int(i) for i in input().split(' ')]))) 
 
if length == input_length:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

if len(a_list) == len(a_set):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
N=int(input().replace('\n',''))
L=input().replace('\n','').split()

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

Submission status: Accepted

Solution code:
N=int(input())
A=[""]*N

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

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

Submission status: Accepted

Solution code:
dic = {}

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

for i in range(N):
    a = A[i]

    if a in dic:
        print("NO")
        break
    else:
        dic[a] = 1

else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())
An = map(int, input().split())
tmp = {}
tmp = {}
ans = "YES"
for i in An:
    if i in tmp:
        ans = "NO"
        break
    tmp[i] = True
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

aa = sorted(a)

for i in range(0,n-1):
    if aa[i] == aa[i+1]:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N-1):
    if l[i] == l[i+1]:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def is_neighbor_same(lst):
  for i in range(len(lst)-1):
    if(lst[i]==lst[i+1]):
      return True
  return False

input()
input_line=[int(x) for x in input().split()]
input_line.sort()
if(is_neighbor_same(input_line)):
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
_ = input()
x = input().strip().split()
y = set(x)
if len(x) == len(y): print('YES')
else: print('NO')

Submission status: Accepted

Solution code:
#ABC154C
import sys
from collections import Counter
n = int(sys.stdin.readline())
L = map(int, sys.stdin.readline().split())
L = Counter(L)
if max(L.values()) >=2:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
N = input()
A = input().split()
a = []
for s in A:
	a.append(int(s))
if len(set(a)) == len(a):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()
ans = 'YES'
for i in range(n - 1):
	if a[i] == a[i+1]:
		ans = 'NO'
		break
print(ans)
"""
setのほうがいいかも
"""

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
def get_input_line():
    return list(map(int, input().split()))
n = int(input())
n_list = get_input_line()
tmp = collections.Counter(n_list)

if(tmp.most_common(1)[0][1] != 1):
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

s.sort()
flg = True
for i in range(n-1):
    if s[i] == s[i+1]:
        flg = False
        break

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    A=LI()
    print(["NO","YES"][N==len(set(A))])
if __name__ == '__main__':
    main()

Submission status: Accepted

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

a.sort()

for i in range(len(a)-1):
    if a[i] == a[i+1]:
        ans = False
        break

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 12 16:01:34 2020

@author: matsui
"""

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

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
An = list(map(int, input().split()))
An = np.array(An)

if len(np.unique(An)) == n:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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: Accepted

Solution code:
n = int(input())

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

A = len(set(a))

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

Submission status: Accepted

Solution code:
N=int(input())

listA=[]

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。


listA.sort()


for i in range(len(listA)-1):
    if listA[i] == listA[i+1]:
        print('NO')
        quit();

print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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