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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

st = set(a)

if len(a) == len(st):
    ans = "YES"
else:
    ans = "NO"

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

def solve():
    N = int(input())
    As = list(map(int, input().split()))
    dic = {}

    for a in As:
        if not a in dic:
            dic[a] = True
            continue
        print("NO")
        return
    print("YES")


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
def inpl():
    return list(map(int, input().split()))


N = input()
A = inpl()

if len(A) == len(set(A)):
    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 len(A) == len(a):
    print("YES")
else :
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

a = sorted(a)
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(a) == len(set(a)):
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
print("YNEOS"[not(len(A)==len(set(A)))::2])

Submission status: Accepted

Solution code:
N = int(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:
N = int(input())
A = list(map(int, input().split()))
SA = list(set(A))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
# MOD = 998244353

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
# ABC154c


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    # 再帰関数を使わない限りPypyで出すこと

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)

YES = "YES"  # type: str
NO = "NO"  # type: str

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))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

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()))
if len(set(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: Runtime Error

Solution code:
from collections import Counter

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

c = Counter(a)

for i in values():
    if i >= 2:
        re += 1

if re >= 0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

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

for x in range(n-1):
  if an[i+1]-an[i] == 0:
    print("NO")
    break

else:
  print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def check(seq):
    return len(seq) != len(set(seq))

def main():
  N = int(input())
  A = list(map(int, input.split()))
  ans = check(A)
  if ans:
    print("NO")
  else:
    print("Yes")
main()

Submission status: Runtime Error

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

check = True
for i in range(A):
  if A.count(A[i]) > 1:
    check = False
    
print("Yes" if check else "No")

Submission status: Runtime Error

Solution code:
import collections
N=int(input())
A=list(map(int,input().split()))
li=list(collections.Counter(A).values())
for i in range(N):
  if li[i]<1:
    print('NO')
    exit()
print('YES')

Submission status: Runtime Error

Solution code:
d = [0] * 200001
n = input()
aaa = list(map(int, input().split(' ')))
ans = 'YES'
for a in aaa:
  d[a] += 1
  if d[a] >= 2:
    ans = 'NO'
print(ans)

Submission status: Runtime Error

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

if N == len(set(A)): print('Yes')
else: print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input.split()))
d = set()
for x in a:
  if x in d:
    print("NO")
    quit()
  d.add(x)
print("YES")

Submission status: Runtime Error

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.append(i)
print('YES')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
n = int(input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input()))
B=[]
p=True
for a in A:
  if a in B:
    p = False
    break
  else:
    B.append(a)
print("Yes" if p else "No")

Submission status: Runtime Error

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: Runtime Error

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

cnt = [0]*(10**9+1)

for i in a:
    cnt[i] += 1
    if cnt[i] > 1:
        print('NO')
        exit()
print('YES')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
res = "YES"
for i in range(n):
  if i.count(a[i])>=2:
    res="NO"
    break
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using namespace __detail;

typedef long long ll;
#define ar array
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define all(x) (x).begin(), (x).end()
#define en '\n'
#define FILL(x, v) memset(x, v, sizeof(x))
#define pb push_back
#define fast                     \
	ios::sync_with_stdio(false); \
	cin.tie(NULL);               \
	cout.tie(NULL);
#define F_OR(i, a, b, s) for (int i = (a); ((s) > 0 ? i < (b) : i > (b)); i += (s))
#define F_OR1(e) F_OR(i, 0, e, 1)
#define F_OR2(i, e) F_OR(i, 0, e, 1)
#define F_OR3(i, b, e) F_OR(i, b, e, 1)
#define F_OR4(i, b, e, s) F_OR(i, b, e, s)
#define GET5(a, b, c, d, e, ...) e
#define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1)
#define FOR(...)       \
	F_ORC(__VA_ARGS__) \
	(__VA_ARGS__)

#define E_ACH2(x, a) for (auto &x : a)
#define E_ACH3(x, y, a) for (auto &[x, y] : a)
#define E_ACH4(x, y, z, a) for (auto &[x, y, z] : a)
#define E_ACHC(...) GET5(__VA_ARGS__, E_ACH4, E_ACH3, E_ACH2)
#define EACH(...)       \
	E_ACHC(__VA_ARGS__) \
	(__VA_ARGS__)

template <typename A, typename B>
inline void chmin(A &a, B b)
{
	if (a > b)
		a = b;
}
template <typename A, typename B>
inline void chmax(A &a, B b)
{
	if (a < b)
		a = b;
}

int main()
{
	fast;
	int n;
	cin >> n;
	set<int> st;
	FOR(n)
	{
		int t;
		cin >> t;
		if (st.find(t) != st.end())
		{
			cout << "NO";
			return 0;
		}
		st.insert(t);
	}
	cout << "Yes";
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

N=int(input())
A=list(map(int,input().split()))
A.sort()
for i in range(N):
  if(A[i]==A[i+1]):
    print("NO")
    sys.exit()
print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

cnt = [0] * 10**9
for i in a:
    cnt[i-1] += 1
if n == a.count(1):
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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

cnt = [0] * 10**9
for i in a:
    cnt[i-1] += 1
if n == a.count(1):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#154
N = int(input())
A = [int(input()) for i in range(N)]
A_set = set(A)
if(len(A)==len(A_set)):
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
already = [False] * 200000
n = int(input())
a = list(map(int, input().split()))
for x in a:
    if already[x]:
        print("NO")
        break
    already[x] = True
else:
    print("YES")

Submission status: Runtime Error

Solution code:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
c = Counter(A)
if c.most_common()[0][1] => 2:
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

x = {}
for i in a:
	if x.get(i, False):
		print("No")
		break
    x[i] = True
else:
	print("Yes")

Submission status: Runtime Error

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

x = {}
for i in a:
	if x.get(i, False):
		print("No")
		break
    x[i] = True
else:
	print("Yes")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python

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

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
A = {input().split()}
print('YNEOS'[len(A)==N::2])

Submission status: Runtime Error

Solution code:
N = int(input())
A = {input().split()}
print('YNEOS'[len(A)==N::2]

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#154c
n = int(input())
a = [input() for _ in range(n)]

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
if len(a)==len(set(a)):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
function Main(input) {
	var str = input;
	var ans = "YES";
	str = str.split("\n");
	var l = str[1].split(" "); 
	loop:
	for(var j =0;j< l.length-1;j++){	
 		for(var i =1; i<l.length;i++){
 			 if(l[j]===l[i]){
	 			ans = "NO";
	 			break loop;
 			}	 	
 		}
	} 	
	console.log(ans);
}
 //*おまじない
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
p = list(map(int,input().split()))
ans = 0
for i in range(n-k+1):
    x = 0
    for j in p[i:i+k]:
        z = 0
        for a in range(1,j+1):
            z+=a*(1/j)
        x+=z
    ans = max(x,ans)
print(ans)

Submission status: Runtime Error

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

for i in range(len(num_list)):
  if num_list[i] == num_list[i+1]:
    print('NO')
    exit()
print('YES')

Submission status: Runtime Error

Solution code:
S=int(input())
T = input().split()
U = [int(T(i)) for i in S]
U.sort
r = 0

for i in S-1:
  if(T[i] == T[i+1]):
    r++
    
if(r==0):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

s = 'YES'
for i in range(N-1):
  if list[i] == list[i+1]:
    s = 'NO'
    break
print(s)

Submission status: Runtime Error

Solution code:
N = int(input())
list1 = list(map(int, input().split())).sort()
pre_num = None
s = 'YES'
for num in list1:
  if num == pre_num:
    s = 'NO'
    break
  pre_num = num
print(s)

Submission status: Runtime Error

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

if lrn(cs) == n:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=[0]*(10**9)
for i in range(N):
    if B[A[i]-1]>=1: 
        print("NO")
        exit(0)
    else:
        B[A[i]-1]+=1
print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
l=list(map(int,input().split()))
d={}
flag=0

for i in range(n):
  if l[i] in d:
    flag=1
    break
    
if flag==0:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
p = list(map(int, input().split()))
a = sum(p[0:k])
l = [a]
for i in range(n-k):
    a = a-p[i]+p[i+k]
    l.append(a)
print((max(l)+k)/2)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
p = list(map(int, input().split()))
a = sum(p[0:k])
l = [a]
for i in range(n-k):
    a = a-p[i]+p[i+k]
    l.append(a)
print(l)
print((max(l)+k)/2)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
A.sort()
for i in range(1, len(A)):
    if A[i - 1] != A[i]:
        continue
        k = True
    else:
        k = False
        break

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
A.sort()
for i in range(1,len(A)):
    if A[i - 1] != A[i]:
        continue
        k = True
    else:
        k = False
        break

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

Submission status: Runtime Error

Solution code:
from math import gcd
N=int(input())
A=list(map(int,input().split()))
flg=1
for i in range(N):
    for j in range(i+1,N):
        if gcd(A[i],A[j])!=1:
            flg=0
print("YES" if flg else "NO")

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
bucket = [0] * max(a)
for i in a:
  bucket[i - 1] += 1
if max(bucket) >= 2:
  print('NO')
else:
  print('YES')

Submission status: Runtime Error

Solution code:
    n=int(input())
    a=list(map(int,input().split(" ")))
    deta=[]
    error=False
     
    for i in range(n):
      if len(deta)==0:
        pass
      elif error:
        break
      elif a[i] in deta:
        error=True
      deta.append(a[i])
    if error:
      print("YES")
    else:
      print("NO")

Submission status: Runtime Error

Solution code:
    n=int(input())
    a=list(map(int,input().split(" ")))
    deta=[]
    error=False
    try:
      for i in range(n):
        if len(deta)==0:
          pass
        elif error:
          break
        elif a[i] in deta:
          error=True
        deta.append(a[i])
    if error:
      print("YES")
    else:
      print("NO")

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split(" ")))
deta=[]
error=False
try:
  for i in range(n):
    if error:
      break
    elif a[i] in deta:
      error=True
    
if error:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split(" ")))
deta=[]
try:
  for i in range(n):
  if a[i] in deta:
	raise "err"
except err:
	print("NO")
print("YES")

Submission status: Runtime Error

Solution code:
n = int(input())
list_n = []
for i in range(n):
    list_n.append(int(input()))

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

Submission status: Runtime Error

Solution code:
stdin = open(0).read().split('\n')
N = int(stdin[0])
A = list(map(int,stdin[1].split()))
print('Yes' if len(A)==len(B) else'No')

Submission status: Runtime Error

Solution code:
#154 Distinct or not
n = int(input())
a = list(map(int,input().split())
b = set(a)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[]
s=0
for i in a:
  if i not in b:
    b.append(i)
  else:
    s=s+1
print('YES' if s=0 else 'NO')

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
dic = {}
for i in range(n):
	try:
		dic[a[i]] += 1
	except:
		dic[a[i]] = 1
if max(dic.values) > 1:
	print("Yes")
else:
  	print("No")

Submission status: Runtime Error

Solution code:
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''

N = int(input())
arr = list(map(int,input().split()))
arr.sort()
ans = 0
for i in range(N-1):
	if arr[i]==arr[i+1]:
		ans = 1
        break

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

Submission status: Runtime Error

Solution code:
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''

N = int(input())
arr = list(map(int,input().split()))
arr.sort()
ans = 0
for i in range(N-1):
	if arr[i]==arr[i+1]:
		ans = 1
        break

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def f(n, a):
    if len(np.unique(a)) == a:
        print('YES')
    else:
        print('NO')

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

f(n, a)

Submission status: Runtime Error

Solution code:
import numpy as np
def f(n, a):
    b = np.subtract.outer(a, a)
    c = np.triu(np.ones_like(b), 1) > 0
    if any(b[c] == 0):
        print('NO')
    else:
        print('YES')


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

f(n, a)

Submission status: Runtime Error

Solution code:
import math
n=int(input())
a=list(map(int,input().split()))
f=False
for i in range(n):
  for j in range(i+1,n):
    if math.gcd(a[i],a[j]) != 1:
      f=True
      break
      
if f:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
n = int (input())
a = [input() for _ in range(n)]
if ( a(i) != a(i+1) ):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
n = int (input())
a = [input() for _ in range(n)]
if ( a(i) != a(i+1) ):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int (input())
a = [input() for _ in range(n)]
if ( a(i) != a(i+1) ):
  print("Yes)
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
def print_ans(N, ar):
    b_list = np.zeros(10**9 + 1, dtype = int)
    flg = True
    for a in ar:
        if b_list[a] == 1:
            flg = False
            break
        b_list[a] = 1
    if flg:
        print("YES")
    else:
        print("NO")
    
    

if __name__ == '__main__':
    N = int(input().rstrip())
    ar = list(map(int,input().rstrip().split()))
    print_ans(N, ar)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
def print_ans(N, ar):
    """Test Case
    >>> print_ans(5, [2, 6, 1, 4, 5])
    YES
    >>> print_ans(6, [4, 1, 3, 1, 6, 2])
    NO
    >>> print_ans(2, [10000000, 10000000])
    NO
    """
    b_list = np.zeros(10**9 + 1, dtype = int)
    flg = True
    for a in ar:
        if b_list[a] == 1:
            flg = False
            break
        b_list[a] = 1
    if flg:
        print("YES")
    else:
        print("NO")
    
    

if __name__ == '__main__':
    N = int(input().rstrip())
    ar = list(map(int,input().rstrip().split()))
    print_ans(N, ar)