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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
SA = list(set(A))

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

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

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

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

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

Solution (Python):
N = input()
a = input().split()
b = set(a)
if len(a)==len(b):
  print('YES')
else:
  print('NO')

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


N = int(sys.stdin.buffer.readline())
A = list(map(int, sys.stdin.buffer.readline().split()))

a = Counter(A).most_common(1)
ok = a[0][1] == 1
if ok:
    print('YES')
else:
    print('NO')

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

n = int(input())

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

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

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):


import sys
sys.setrecursionlimit(300000)

YES = "YES"  
NO = "NO"  

def solve(N: int, A: "List[int]"):
    A.sort()
    for i in range(1, len(A)):
        if A[i] == A[i - 1]:
            print(NO)
            return
    print(YES)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, A)

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
from bisect import *
from collections import *
from fractions import gcd

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

Solution (Python):
def I(): return int(input())
def MI(): return map(int, input().split())
def LMI(): return list(map(int, input().split()))


N = I()
A = LMI()

d = dict()
for a in A:
    if d.get(a) is None:
        d[a] = 1
    else:
        print('NO')
        exit(0)
print('YES')

Solution (Python):
N = int(input().strip())
print('YES' if len(set(input().strip().split())) == N else 'NO')

Solution (Python):
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
A = read_ints()
A_ = set(A)
if len(A) == len(A_):
    print('YES')
else:
    print('NO')

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

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

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