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:
n = int(input())
ans = set()
puzzle = list(map(int,input().split()))
for x in puzzle:
    ans.add(x)
l = len(ans)
p = len(puzzle)
if l==p:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: 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:
import sys

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("NO")
    sys.exit()
print("YES")

Submission status: Accepted

Solution code:
import sys
N = int(input())
cc = list(map(int,input().split()))
dic = set()
for i in cc:
  if i in dic:
    print('NO')
    sys.exit()
  else:
    dic.add(i)
print('YES')

Submission status: Accepted

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

sets = set(num_list)

if len(num_list) == len(sets):
    ans = 'YES'
else:
    ans = 'NO'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split());print("YES"if len(set(a))==n 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()]
a.sort()

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

print("YES")

Submission status: Accepted

Solution code:
n = int(input())
lis = input().split()
dic = {}

for i in range(n):
  if lis[i] not in dic:
    dic[lis[i]] = 1
  else:
    dic[lis[i]] += 1
    
for x in dic.values():
  if x != 1:
    print("NO")
    exit()

print("YES")

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

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

Submission status: Accepted

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

print(['YES', 'NO'][len(A) != len(set(A))])

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1,N,2):
    boollist = [ A[i-1] == A[i] ]
    if i < N-1 :
        boollist.append(A[i] == A[i+1])
    if any(boollist):
        ans = "NO"
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a = Counter(a).most_common()
if len(a) == n:
    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()))
print("YES" if(len(A) == len(set(A))) else "NO")

Submission status: Accepted

Solution code:
n = int(input())
A = set(map(int, input().split()))
print('YES') if n == len(A) 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:
def main():
    n = int(input())
    a = set(map(int, input().split(" ")))
    print("YES" if len(a) == n else "NO")

main()

Submission status: Accepted

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

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:
import sys
n=int(input())
a=[s for s in input().split()]
a=sorted(a)
for i in range(n-1):
    if a[i]==a[i+1]:
        print("NO")
        sys.exit()
print("YES")

Submission status: Accepted

Solution code:
import collections

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

cs = collections.Counter(A)
mcs = cs.most_common()
cnt = mcs[0][1]
if cnt == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
d = Counter(a)
k = d.most_common(1)[0][1]
if k>=2:
  print('NO')
else:
  print('YES')

Submission status: Accepted

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

for v in cnt.values():
    if v>1:
        print('NO')
        break
else:
    print('YES')

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline().rstrip())
A = [int(x) for x in sys.stdin.readline().rstrip().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:
n=int(input())

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

b.sort()
for i in range(n-1):
  if b[i]==b[i+1]:
    print("NO")
    break
  if i==n-2:
    print("YES")

Submission status: Accepted

Solution code:
print("YES") if int(input()) == len(list(set(input().split(" ")))) 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 = sorted(a)

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

Submission status: Accepted

Solution code:
import sys
N = int(next(sys.stdin))
A = tuple(map(int, next(sys.stdin).strip().split()))
a = frozenset(A)

print('YES' if len(A) == len(a) else '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())
a=list(map(int,input().split()))

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

Submission status: Accepted

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


ans={}
flag=0
for i in a:
  if i not in ans:
    ans[i]=1
  else:
    flag=1
    break

if flag==1:
  print("NO")
else:
  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())
m = list(map(int,input().split()))
if len(set(m)) == len(m):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
A = input().split()
a_set = set(A)
if len(A) == len(a_set):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
A = map(int, input().split())
answer = 'YES'
for v in collections.Counter(A).values():
    if v != 1:
        answer = 'NO'
        break
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: 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:
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:
n = int(input())
P = list(map(int,input().split()))


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

print(ans)

Submission status: Accepted

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

print(['NO','YES'][len(A)==len(set(A))])

Submission status: Accepted

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

Submission status: Accepted

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

newA = list(set(A))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
A = list(map(int, input().split()))
B = set()
for a in A:
	B.add(a)
if len(A) == len(B):
	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 = set(input().split())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')
YES = "YES"  # type: str
NO = "NO"  # type: str


def list_uniq_count(l):
    return len(set(l))


def solve(N: int, A: "List[int]"):
    return [NO, YES][list_uniq_count(A) == len(A)]


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(f'{solve(N, A)}')


if __name__ == '__main__':
    main()

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(input().split())

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

Submission status: Accepted

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

flag = 0

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

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

Submission status: Accepted

Solution code:
import sys


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    print("YES" if n == len(set(a)) else "NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

    set_A = set([])
    for num in A:
        if num in set_A:
            print('NO')
            return
        set_A.add(num)
    print('YES')

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    l = list(map(int, input().split()))
    l = Counter(l)
    if all(i == 1 for i in l.values()):
        print("YES")
    else:
        print("NO")


if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    l = list(map(int, input().split()))
    len_l = len(l)
    len_set_l = len(set(l))
    if len_l != len_set_l:
        print("NO")
    else:
        print("YES")



if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools, bisect
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def S(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N = I()
    A = LI()
    s = set(A)
    print("YES" if len(s) == len(A) else "NO")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l.sort()

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

Submission status: Accepted

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


solve()

Submission status: Accepted

Solution code:
from typing import List


def main():
    n = int(input())
    nums = input().split(' ')
    r = don(n, nums)
    if r:
        print('YES')
    else:
        print('NO')


def don(n: int, nums: List[str]) -> bool:
    s = set()
    result = True

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

    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


solve()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A.sort()
Ans = "YES"
List = []
before_n = 0
for e in A:
    if e == before_n:
        Ans = "NO"
        break
    else:
        before_n=e
print(Ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    """"ここに今までのコード"""
    N = int(input())
    num_list = list(map(int, input().split()))
    num_list.sort()
    distinctFlg = False

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

n = inp()
a = inpl()

ans = 'YES'
d = defaultdict(int)
for i in a:
    if d[i] == 1:
        ans = 'NO'
        break
    d[i] = 1

print(ans)

Submission status: Accepted

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

from collections import Counter
b = Counter(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if max(cnt.values()) > 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
    solve()

Submission status: Accepted

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

set_a=set(a)

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

Submission status: Accepted

Solution code:
from collections import Counter

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

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

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:
def main():
    n = int(input())
    nums = input().split(' ')
    s = set()
    result = 'YES'

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

    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def distinct_or_not():
    # 入力
    N = int(input())
    A = list(map(int, input().split()))
    # Aを集合型に変換
    A_set = set(A)
    # AとA_setを比較
    if len(A) == len(A_set):
        return 'YES'
    else:
        return 'NO'

result = distinct_or_not()
print(result)

Submission status: Accepted

Solution code:
input()
(*a,) = map(int, input().split())
print(["NO", "YES"][len(a) == len(set(a))])

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if(len(l1)==len(set(l1))):
    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,*a = map(int,open(0).read().split())
a.sort()
flag = True
for i in range(1,N):
  if a[i]==a[i-1]:
    print('NO')
    flag=False
    break
if flag ==True:
  print('YES')

Submission status: Accepted

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

def main(n,a):
    a.sort()
    for i in range(n-1):
        if a[i]==a[i+1]:
            return 'NO'
    return 'YES'

if __name__=='__main__':
    n,a=readinput()
    ans=main(n,a)
    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:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N = read_int()
    A = read_ints()
    if len(A) == len(set(A)):
        return 'YES'
    return 'NO'


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

Submission status: Accepted

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

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 = input()
an = [int(num) for num in input().split()]
an_unique = list(set(an))

if len(an) == len(an_unique):
  print("YES")
else :
  print("NO")

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import itertools

n = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

print("YES" if len(set(nums)) == len(nums) else "NO")

Submission status: Accepted

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

s = set()
for i in range(len(a)):
    s.add(a[i])

if len(a) == len(s):
    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=int(input())
li=sorted(list(map(int,input().split())))
bef=-1

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

Submission status: Accepted

Solution code:
from collections import Counter
N = map(int, input().split())
A = list(map(int, input().split()))
dic=Counter(A)
for val in dic.values():
    if val > 1:
        print("NO")
        exit()

print("YES")

Submission status: Accepted

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

li = collections.Counter(a)

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

if max(li2)==1:
    print("YES")
else:
    print("NO")

Submission status: 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:
import sys
input = sys.stdin.readline
n=int(input())
L=list(map(int,input().split()))
if len(set(L))!=n:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


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

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


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import collections as cl
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    S = LI()

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


main()

Submission status: Accepted

Solution code:
n=int(input());print('NYOE S'[len(set(map(int,input().split())))==n::2])

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
X=-1
T=True
for i in L:
  if i!=X:
    X=i
  else:
    T=False
if T==True:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
def judge(n,a):
    table = {}
    for i in range(n):
        if a[i] in table.keys():
            print('NO')
            return
        else:
            table[a[i]] = 1
    print('YES')
    return
    
n = int(input())
a = list(map(int,input().split()))

judge(n,a)

Submission status: Accepted

Solution code:
# import itertools
# import math
# import sys
import numpy as np

N = int(input())
# S = input()
# n, *a = map(int, open(0))
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
# Q = list(map(int, input().split()))
# S = input()


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

print('YNEOS'[len(A) != len(np.unique(A))::2])

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()
A = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
from collections import Counter as Ct
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def do():
    n=INT()
    a=LIST()
    a=set(a)
    if n==len(a):
        print('YES')
    else:
        print('NO')
if __name__=='__main__':
    do()

Submission status: Accepted

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