AtCoder Beginner Contest 063 - Varied

You are given a string S consisting of lowercase English letters. Determine whether all the characters in S are different.

-----Constraints-----
 - 2 ≤ |S| ≤ 26, where |S| denotes the length of S.
 - S consists of lowercase English letters.

-----Input-----
Input is given from Standard Input in the following format:
S

-----Output-----
If all the characters in S are different, print yes (case-sensitive); otherwise, print no.

-----Sample Input-----
uncopyrightable

-----Sample Output-----
yes

Difficulty: EASY

Starter code:

Solutions:
s = input()
if len(s) == len(set(s)):
	print('yes')
else:
	print('no')


S = input()
s = len(set(S))
l = len(S)
print(['no', 'yes'][s == l])


S = [i for i in input()]
print('yes' if len(S) == len(set(S)) else 'no')


s = input()
lst1 = []
for i in range(len(s)):
	lst1.append(s[i])
lst1.sort()
lst2 = list(set(lst1))
lst2.sort()
if lst1 == lst2:
	print('yes')
else:
	print('no')


s = input()
l = len(set(s))
ls = len(s)
print('yes' if l == ls else 'no')


S = input()
print(['yes', 'no'][not len(S) == len(set(S))])


s = str(input())
t = []
t.append(s[0])
for i in range(1, len(s)):
	if s[i] in t:
		print('no')
		return
	t.append(s[i])
print('yes')


import math
a = input()
print('yes' if len(a) - len(set(a)) == 0 else 'no')


S = input()
print('yes' if len(set(list(S))) == len(S) else 'no')


s = input()
for i in s:
	if s.count(i) != 1:
		print('no')
		return
print('yes')


string = input()
print('yes') if len(string) == len(set(string)) else print('no')


s = input()
l = list(set(s))
if len(s) == len(l):
	print('yes')
else:
	print('no')


s = input()
t = set()
for x in s:
	if x in t:
		print('no')
		return
	else:
		t.add(x)
print('yes')


a = input()
c = []
for i in a:
	c.append(i)
d = set(c)
if len(d) < len(c):
	print('no')
else:
	print('yes')


s = input()
st = set()
for c in s:
	if c in st:
		print('no')
		return
	st.add(c)
print('yes')


s = input()
print('yneos'[len(s) != len(set(s))::2])


s = input()
print(['yes', 'no'][len(set(s)) != len(s)])


import re
print('no' if re.match('.*(.).*\\1.*', input()) else 'yes')


w = input()
if len(w) == len(set(w)):
	print('yes')
else:
	print('no')


S = list(input())
S.sort()
count = 0
for i in range(len(S) - 1):
	if S[i] == S[i + 1]:
		count += 1
if count == 0:
	print('yes')
else:
	print('no')


S = list(input())
S.sort()
for i in range(len(S) - 1):
	if S[i] == S[i + 1]:
		print('no')
		return
print('yes')


e = input()
print(['yes', 'no'][len(e) > len(set(e))])


a = input()
b = []
c = 0
for i in range(len(a)):
	b.append(a[i])
b.sort()
for i in range(len(a) - 1):
	if b[i] == b[i + 1]:
		c = c + 1
if c == 0:
	print('yes')
else:
	print('no')


def main():
	s = input()
	ans = 'no'
	if len(set(s)) == len(s):
		ans = 'yes'
	print(ans)

def __starting_point():
	main()
__starting_point()


S = input()
print('yes' if len(S) - len(set(S)) == 0 else 'no')


s = input()
res = 'yes'
for i in range(len(s)):
	for j in range(i + 1, len(s)):
		if s[i] == s[j]:
			res = 'no'
print(res)


str = input()
count = 0
table = list(str)
for i in range(len(str) - 1):
	for j in range(i + 1, len(str)):
		if table[i] == table[j]:
			count += 1
if count == 0:
	print('yes')
else:
	print('no')


S = input()

def duplicate(seq):
	seen = []
	unique = [x for x in seq if x not in seen and (not seen.append(x))]
	return len(seq) != len(unique)
if duplicate(S):
	print('no')
else:
	print('yes')


a = list(input())
print('yes' if len(a) == len(set(a)) else 'no')


ss = [s for s in input()]
print('yes' if len(set(ss)) == len(ss) else 'no')


S = input()
print('yneos'[len(list(S)) != len(set(S))::2])


s = input()
s = sorted(s)
dif = True
for i in range(len(s) - 1):
	if s[i] == s[i + 1]:
		dif = False
print('yes' if dif else 'no')


s = input()
n = len(s)
for i in range(n):
	if s.count(s[i]) != 1:
		print('no')
		return
print('yes')


n = input()
n_1 = set(n)
print('yes' if len(n) == len(n_1) else 'no')


s = str(input())
n = len(s)
print('yes' if len(set(s)) == n else 'no')


x = input()
print('no' if len(x) - len(set(x)) != 0 else 'yes')


s = [i for i in input()]
print('yes' if len(list(set(s))) == len(s) else 'no')


n = input()
print(('yes', 'no')[len(set(n)) < len(n)])


S = str(input())
list = []
ans = 'yes'
for s in S:
	for past in list:
		if s == past:
			ans = 'no'
			break
	if ans == 'no':
		break
	list.append(s)
print(ans)


letter = input()
print('yes' if len(set(letter)) == len(letter) else 'no')


from collections import Counter
string = Counter(input())
for _ in string.values():
	if _ > 1:
		print('no')
		break
else:
	print('yes')


s = input()
word = []
for i in s:
	if i not in word:
		word.append(i)
	else:
		print('no')
		return
print('yes')


s = str(input())
print('yes' if len(s) == len(set(list(s))) else 'no')


def main():
	s = input()
	answer = 'yes'
	for i in range(len(s) - 1):
		if s[i] in s[i + 1:]:
			answer = 'no'
	print(answer)

def __starting_point():
	main()
__starting_point()


S = input()
ans = ''
for s in S:
	if S.count(s) > 1:
		ans = 'no'
		break
	else:
		ans = 'yes'
print(ans)


S = input()
L = set(S)
print('yes' if len(S) == len(L) else 'no')


data = list(input())
c = 0
for i in range(0, len(data) - 1):
	for j in range(i + 1, len(data)):
		if data[i] == data[j]:
			c = c + 1
if c == 0:
	print('yes')
else:
	print('no')


s = input()
sl = list(s)
print('yes' if len(sl) == len(set(sl)) else 'no')


S = input()
X = 'no'
if len(S) - len(set(S)) == 0:
	X = 'yes'
print(X)


S = input()
for i in range(len(S)):
	if S[i] in S[i + 1:]:
		print('no')
		break
else:
	print('yes')


s = input()
ss = set(s)
ans = 'no'
if len(s) == len(ss):
	ans = 'yes'
print(ans)


s = input()
letters = []
ans = 'yes'
for i in s:
	if i in letters:
		ans = 'no'
		break
	else:
		letters.append(i)
print(ans)


a = [0] * 26
S = input()
i = 0
while True:
	if i == len(S):
		print('yes')
		break
	b = ord(S[i]) - 97
	if a[b] == 1:
		print('no')
		break
	else:
		a[b] = 1
		i += 1


from collections import defaultdict
import sys
s = input()
n = len(s)
dic = defaultdict(int)
for i in range(n):
	dic[s[i]] += 1
	if dic[s[i]] == 2:
		print('no')
		return
print('yes')


S = input()
n1 = len(S)
n2 = len(set(S))
if n1 == n2:
	print('yes')
else:
	print('no')


a = input()
b = set(a)
print('yes') if len(a) == len(b) else print('no')


s = str(input())
L = []
for i in s:
	if i in L:
		print('no')
		return
	else:
		L.append(i)
print('yes')


S = input()
data = set()
for s in S:
	if s not in data:
		data.add(s)
	else:
		print('no')
		return
print('yes')


import sys
S = input()
for s in S:
	if S.count(s) > 1:
		print('no')
		return
print('yes')


S = str(input())
print('yes' if len(S) == len(set(S)) else 'no')


s = [c for c in input()]
if len(set(s)) < len(s):
	print('no')
else:
	print('yes')


s = input()
s = sorted(s)
for i in range(len(s) - 1):
	if s[i] == s[i + 1]:
		print('no')
		return
print('yes')


u = input()
for i in range(len(u)):
	for j in range(i + 1, len(u)):
		if u[i] == u[j]:
			print('no')
			return
print('yes')


s = list(input())
print('yes' if sorted(s) == sorted(set(s)) else 'no')


s = list(input())
for i in s:
	if s.count(i) > 1:
		print('no')
		break
else:
	print('yes')


s = list(input())
t = list(set(s))
print('yes' if len(s) == len(t) else 'no')


s = list(input())
n = len(s)
s = set(s)
nn = len(s)
if n == nn:
	print('yes')
else:
	print('no')


s = list(input())
while s:
	c = s.pop()
	if c in s:
		print('no')
		return
print('yes')


s = input()
l = list(s)
ls = list(set(l))
print(['no', 'yes'][len(l) == len(ls)])


import sys
input = sys.stdin.readline

def main():
	s = input().rstrip()
	string_dict = {}
	for i in s:
		if i not in string_dict:
			d = {i: 1}
			string_dict.update(d)
		else:
			print('no')
			return
	print('yes')

def __starting_point():
	main()
__starting_point()


s = input()
t = True
for i in s:
	if s.count(i) != 1:
		t = False
print('yes' if t else 'no')


import sys
import copy
import math
import itertools
import numpy as np
S = input()
for i in range(len(S)):
	if S.count(S[i]) > 1:
		print('no')
		return
print('yes')


s = input()
l = []
for i in range(len(s)):
	if not s[i] in l:
		l.append(s[i])
	else:
		print('no')
		return
print('yes')


S = input().strip()
print('yes' if len(S) == len(set(S)) else 'no')


print((lambda x: 'yes' if len(x) == len(set(x)) else 'no')(list(input())))


import collections
s = input()
c = collections.Counter(s)
if all((x == 1 for x in c.values())):
	print('yes')
else:
	print('no')


s = input()
a = ''
for i in s:
	if a.find(i) == -1:
		a += i
	else:
		print('no')
		break
else:
	print('yes')


s = list(input())
ss = set(s)
print('yes' if len(s) == len(ss) else 'no')


a = input()
print(['no', 'yes'][len(a) == len(set(a))])


from collections import Counter
S = input()
count = Counter(S)
for cnt in count.values():
	if cnt != 1:
		print('no')
		return
else:
	print('yes')


S = input()
for c in S:
	if S.count(c) > 1:
		print('no')
		break
else:
	print('yes')


S = input()
T = sorted(S)
U = set(T)
U = sorted(U)
if T == U:
	print('yes')
else:
	print('no')


S = input()
a = [0] * 26
num = ord('a')
for i in range(len(S)):
	tmp = ord(S[i]) - num
	if a[tmp]:
		print('no')
		break
	a[tmp] = 1
else:
	print('yes')


s = list(input())
ans = 'yes' if len(s) == len(set(s)) else 'no'
print(ans)


i = input()
print('yes' if len(set(i)) == len(i) else 'no')


s = input()
x = 0
for i in s:
	c = 0
	for j in s:
		if i == j:
			c += 1
	if c != 1:
		print('no')
		break
	else:
		x += 1
		if x == len(s):
			print('yes')
			break


s = [i for i in input()]
print(['no', 'yes'][len(s) == len(set(s))])


def main():
	s = input()
	if len(set(s)) == len(s):
		print('yes')
	else:
		print('no')

def __starting_point():
	main()
__starting_point()


S = str(input())
data1 = []
for i in range(len(S)):
	data1.append(S[i])
data2 = list(set(data1))
if len(data1) == len(data2):
	print('yes')
else:
	print('no')


S = input()
se = set(S)
print('yes' if len(se) == len(S) else 'no')


S = input()
past = []
ans = 'yes'
for s in S:
	if s not in past:
		past.append(s)
	else:
		ans = 'no'
		break
print(ans)


S = input()
s_set = set(S)
print('yes' if len(S) == len(s_set) else 'no')


from collections import deque
d = deque()
for s in input():
	if s in d:
		print('no')
		return
	else:
		d.append(s)
print('yes')


S = input()
ls = []
check = True
for i in range(len(S)):
	if S[i] in ls:
		check = False
		break
	ls.append(S[i])
print('yes' if check else 'no')


S = list(input())
print(['no', 'yes'][len(S) == len(set(S))])


def answer(s: str) -> str:
	return 'yes' if len(s) == len(set(s)) else 'no'

def main():
	s = input()
	print(answer(s))

def __starting_point():
	main()
__starting_point()


from typing import List
S = list(input())
if len(S) == len(set(S)):
	print('yes')
else:
	print('no')


s = input()
bool = True
for i in range(len(s) - 1):
	for j in range(i + 1, len(s)):
		if s[i] == s[j]:
			bool = False
if bool:
	print('yes')
else:
	print('no')


S = input()
print('yes' if len(S) == len(set([s for s in S])) else 'no')


import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

def si():
	return input()

def ii():
	return int(input())

def fi():
	return float(input())

def lstr():
	return input().split()

def lint():
	return list(map(int, input().split()))

def lintdec():
	return list(map(lambda x: int(x) - 1, input().split()))

def lnstr(n):
	return [input() for _ in range(n)]

def lnint(n):
	return [int(input()) for _ in range(n)]

def lint_list(n):
	return [lint() for _ in range(n)]
S = si()
print('yes' if len(set(S)) == len(S) else 'no')


s = input()
l = []
for i in s:
	if i in l:
		print('no')
		return
	else:
		l.append(i)
print('yes')


S = input()
i = len(S)
I = len(set(S))
print('yes' if i == I else 'no')


s = str(input())
chars = set()
ans = 'yes'
for c in s:
	if c in chars:
		ans = 'no'
		break
	chars.add(c)
print(ans)


N = input()
if len(N) == len(set(N)):
	print('yes')
else:
	print('no')


a = input()
b = set(a)
c = list(a)
print(['no', 'yes'][len(b) == len(c)])


S = input()
set_S = set(S)
print('yes' if len(S) == len(set_S) else 'no')


S = list(input())
ans = 'yes'
for i in range(len(S)):
	ch = S[i]
	S[i] = '-1'
	if ch in S:
		ans = 'no'
		break
print(ans)


S = str(input())
t = set(S)
ans = 'no'
if len(S) == len(t):
	ans = 'yes'
print(ans)