CodeEff/ECCO huggingface dataset:
Problem Description: Score : 100 points
Problem Statement
Snuke is buying a bicycle.
The bicycle of his choice does not come with a bell, so he has to buy one separately.
He has very high awareness of safety, and decides to buy two bells, one for each hand.
The store sells three kinds of bells for the price of
a
,
b
and
c
yen (the currency of Japan), respectively.
Find the minimum total price of two different bells.
Constraints
1 \leq a,b,c \leq 10000
a
,
b
and
c
are integers.
Input
Input is given from Standard Input in the following format:
a
b
c
Output
Print the minimum total price of two different bells.
Sample Input 1
700 600 780
Sample Output 1
1300
Buying a
700
-yen bell and a
600
-yen bell costs
1300
yen.
Buying a
700
-yen bell and a
780
-yen bell costs
1480
yen.
Buying a
600
-yen bell and a
780
-yen bell costs
1380
yen.
The minimum among these is
1300
yen.
Sample Input 2
10000 10000 10000
Sample Output 2
20000
Buying any two bells costs
20000
yen.
Problem Description: Score : 200 points
Problem Statement
We will call a string that can be obtained by concatenating two equal strings an
even
string.
For example,
xyzxyz
and
aaaaaa
are even, while
ababab
and
xyzxy
are not.
You are given an even string
S
consisting of lowercase English letters.
Find the length of the longest even string that can be obtained by deleting one or more characters from the end of
S
.
It is guaranteed that such a non-empty string exists for a given input.
Constraints
2 \leq |S| \leq 200
S
is an even string consisting of lowercase English letters.
There exists a non-empty even string that can be obtained by deleting one or more characters from the end of
S
.
Input
Input is given from Standard Input in the following format:
S
Output
Print the length of the longest even string that can be obtained.
Sample Input 1
abaababaab
Sample Output 1
6
abaababaab
itself is even, but we need to delete at least one character.
abaababaa
is not even.
abaababa
is not even.
abaabab
is not even.
abaaba
is even. Thus, we should print its length,
6
.
Sample Input 2
xxxx
Sample Output 2
2
xxx
is not even.
xx
is even.
Sample Input 3
abcabcabcabc
Sample Output 3
6
The longest even string that can be obtained is
abcabc
, whose length is
6
.
Sample Input 4
akasakaakasakasakaakas
Sample Output 4
14
The longest even string that can be obtained is
akasakaakasaka
, whose length is
14
.
Problem Description: Score : 300 points
Problem Statement
You are given an integer sequence of length
n
,
a_1, ..., a_n
.
Let us consider performing the following
n
operations on an empty sequence
b
.
The
i
-th operation is as follows:
Append
a_i
to the end of
b
.
Reverse the order of the elements in
b
.
Find the sequence
b
obtained after these
n
operations.
Constraints
1 \leq n \leq 2\times 10^5
0 \leq a_i \leq 10^9
n
and
a_i
are integers.
Input
Input is given from Standard Input in the following format:
n
a_1
a_2
...
a_n
Output
Print
n
integers in a line with spaces in between.
The
i
-th integer should be
b_i
.
Sample Input 1
4
1 2 3 4
Sample Output 1
4 2 1 3
After step 1 of the first operation,
b
becomes:
1
.
After step 2 of the first operation,
b
becomes:
1
.
After step 1 of the second operation,
b
becomes:
1, 2
.
After step 2 of the second operation,
b
becomes:
2, 1
.
After step 1 of the third operation,
b
becomes:
2, 1, 3
.
After step 2 of the third operation,
b
becomes:
3, 1, 2
.
After step 1 of the fourth operation,
b
becomes:
3, 1, 2, 4
.
After step 2 of the fourth operation,
b
becomes:
4, 2, 1, 3
.
Thus, the answer is
4 2 1 3
.
Sample Input 2
3
1 2 3
Sample Output 2
3 1 2
As shown above in Sample Output 1,
b
becomes
3, 1, 2
after step 2 of the third operation. Thus, the answer is
3 1 2
.
Sample Input 3
1
1000000000
Sample Output 3
1000000000
Sample Input 4
6
0 6 7 6 7 0
Sample Output 4
0 6 6 0 7 7
Problem Description: Score : 600 points
Problem Statement
You are given an integer sequence of length
n+1
,
a_1,a_2,...,a_{n+1}
, which consists of the
n
integers
1,...,n
.
It is known that each of the
n
integers
1,...,n
appears at least once in this sequence.
For each integer
k=1,...,n+1
, find the number of the different subsequences (not necessarily contiguous) of the given sequence with length
k
, modulo
10^9+7
.
Notes
If the contents of two subsequences are the same, they are not separately counted even if they originate from different positions in the original sequence.
A subsequence of a sequence
a
with length
k
is a sequence obtained by selecting
k
of the elements of
a
and arranging them without changing their relative order. For example, the sequences
1,3,5
and
1,2,3
are subsequences of
1,2,3,4,5
, while
3,1,2
and
1,10,100
are not.
Constraints
1 \leq n \leq 10^5
1 \leq a_i \leq n
Each of the integers
1,...,n
appears in the sequence.
n
and
a_i
are integers.
Input
Input is given from Standard Input in the following format:
n
a_1
a_2
...
a_{n+1}
Output
Print
n+1
lines.
The
k
-th line should contain the number of the different subsequences of the given sequence with length
k
, modulo
10^9+7
.
Sample Input 1
3
1 2 1 3
Sample Output 1
3
5
4
1
There are three subsequences with length
1
:
1
and
2
and
3
.
There are five subsequences with length
2
:
1,1
and
1,2
and
1,3
and
2,1
and
2,3
.
There are four subsequences with length
3
:
1,1,3
and
1,2,1
and
1,2,3
and
2,1,3
.
There is one subsequence with length
4
:
1,2,1,3
.
Sample Input 2
1
1 1
Sample Output 2
1
1
There is one subsequence with length
1
:
1
.
There is one subsequence with length
2
:
1,1
.
Sample Input 3
32
29 19 7 10 26 32 27 4 11 20 2 8 16 23 5 14 6 12 17 22 18 30 28 24 15 1 25 3 13 21 19 31 9
Sample Output 3
32
525
5453
40919
237336
1107568
4272048
13884156
38567100
92561040
193536720
354817320
573166440
818809200
37158313
166803103
166803103
37158313
818809200
573166440
354817320
193536720
92561040
38567100
13884156
4272048
1107568
237336
40920
5456
528
33
1
Be sure to print the numbers modulo
10^9+7
.
Problem Description: Score : 700 points
Problem Statement
Snuke is buying a lamp.
The light of the lamp can be adjusted to
m
levels of brightness, represented by integers from
1
through
m
, by the two buttons on the remote control.
The first button is a "forward" button. When this button is pressed, the brightness level is increased by
1
, except when the brightness level is
m
, in which case the brightness level becomes
1
.
The second button is a "favorite" button. When this button is pressed, the brightness level becomes the favorite brightness level
x
, which is set when the lamp is purchased.
Snuke is thinking of setting the favorite brightness level
x
so that he can efficiently adjust the brightness.
He is planning to change the brightness
n-1
times. In the
i
-th change, the brightness level is changed from
a_i
to
a_{i+1}
. The initial brightness level is
a_1
.
Find the number of times Snuke needs to press the buttons when
x
is set to minimize this number.
Constraints
2 \leq n,m \leq 10^5
1 \leq a_i\leq m
a_i \neq a_{i+1}
n
,
m
and
a_i
are integers.
Input
Input is given from Standard Input in the following format:
n
m
a_1
a_2
…
a_n
Output
Print the minimum number of times Snuke needs to press the buttons.
Sample Input 1
4 6
1 5 1 4
Sample Output 1
5
When the favorite brightness level is set to
1
,
2
,
3
,
4
,
5
and
6
, Snuke needs to press the buttons
8
,
9
,
7
,
5
,
6
and
9
times, respectively.
Thus, Snuke should set the favorite brightness level to
4
.
In this case, the brightness is adjusted as follows:
In the first change, press the favorite button once, then press the forward button once.
In the second change, press the forward button twice.
In the third change, press the favorite button once.
Sample Input 2
10 10
10 9 8 7 6 5 4 3 2 1
Sample Output 2
45
Problem Description: Score : 200 points
Problem Statement
Takahashi wants to gain muscle, and decides to work out at AtCoder Gym.
The exercise machine at the gym has
N
buttons, and exactly one of the buttons is lighten up.
These buttons are numbered
1
through
N
.
When Button
i
is lighten up and you press it, the light is turned off, and then Button
a_i
will be lighten up. It is possible that
i=a_i
.
When Button
i
is not lighten up, nothing will happen by pressing it.
Initially, Button
1
is lighten up. Takahashi wants to quit pressing buttons when Button
2
is lighten up.
Determine whether this is possible. If the answer is positive, find the minimum number of times he needs to press buttons.
Constraints
2 ≤ N ≤ 10^5
1 ≤ a_i ≤ N
Input
Input is given from Standard Input in the following format:
N
a_1
a_2
:
a_N
Output
Print
-1
if it is impossible to lighten up Button
2
.
Otherwise, print the minimum number of times we need to press buttons in order to lighten up Button
2
.
Sample Input 1
3
3
1
2
Sample Output 1
2
Press Button
1
, then Button
3
.
Sample Input 2
4
3
4
1
2
Sample Output 2
-1
Pressing Button
1
lightens up Button
3
, and vice versa, so Button
2
will never be lighten up.
Sample Input 3
5
3
3
4
2
4
Sample Output 3
3
Problem Description: Score : 300 points
Problem Statement
Snuke has
N
dogs and
M
monkeys. He wants them to line up in a row.
As a Japanese saying goes, these dogs and monkeys are on bad terms.
("ken'en no naka", literally "the relationship of dogs and monkeys", means a relationship of mutual hatred.)
Snuke is trying to reconsile them, by arranging the animals so that there are neither two adjacent dogs nor two adjacent monkeys.
How many such arrangements there are? Find the count modulo
10^9+7
(since animals cannot understand numbers larger than that).
Here, dogs and monkeys are both distinguishable. Also, two arrangements that result from reversing each other are distinguished.
Constraints
1 ≤ N,M ≤ 10^5
Input
Input is given from Standard Input in the following format:
N
M
Output
Print the number of possible arrangements, modulo
10^9+7
.
Sample Input 1
2 2
Sample Output 1
8
We will denote the dogs by
A
and
B
, and the monkeys by
C
and
D
. There are eight possible arrangements:
ACBD
,
ADBC
,
BCAD
,
BDAC
,
CADB
,
CBDA
,
DACB
and
DBCA
.
Sample Input 2
3 2
Sample Output 2
12
Sample Input 3
1 8
Sample Output 3
0
Sample Input 4
100000 100000
Sample Output 4
530123477
Problem Description: Score : 500 points
Problem Statement
There are
N
towns on a plane. The
i
-th town is located at the coordinates
(x_i,y_i)
. There may be more than one town at the same coordinates.
You can build a road between two towns at coordinates
(a,b)
and
(c,d)
for a cost of
min(|a-c|,|b-d|)
yen (the currency of Japan). It is not possible to build other types of roads.
Your objective is to build roads so that it will be possible to travel between every pair of towns by traversing roads. At least how much money is necessary to achieve this?
Constraints
2 ≤ N ≤ 10^5
0 ≤ x_i,y_i ≤ 10^9
All input values are integers.
Input
Input is given from Standard Input in the following format:
N
x_1
y_1
x_2
y_2
:
x_N
y_N
Output
Print the minimum necessary amount of money in order to build roads so that it will be possible to travel between every pair of towns by traversing roads.
Sample Input 1
3
1 5
3 9
7 8
Sample Output 1
3
Build a road between Towns
1
and
2
, and another between Towns
2
and
3
. The total cost is
2+1=3
yen.
Sample Input 2
6
8 3
4 9
12 19
18 1
13 5
7 6
Sample Output 2
8
Problem Description: Score : 700 points
Problem Statement
Snuke is playing a puzzle game.
In this game, you are given a rectangular board of dimensions
R × C
, filled with numbers. Each integer
i
from
1
through
N
is written twice, at the coordinates
(x_{i,1},y_{i,1})
and
(x_{i,2},y_{i,2})
.
The objective is to draw a curve connecting the pair of points where the same integer is written, for every integer from
1
through
N
.
Here, the curves may not go outside the board or cross each other.
Determine whether this is possible.
Constraints
1 ≤ R,C ≤ 10^8
1 ≤ N ≤ 10^5
0 ≤ x_{i,1},x_{i,2} ≤ R(1 ≤ i ≤ N)
0 ≤ y_{i,1},y_{i,2} ≤ C(1 ≤ i ≤ N)
All given points are distinct.
All input values are integers.
Input
Input is given from Standard Input in the following format:
R
C
N
x_{1,1}
y_{1,1}
x_{1,2}
y_{1,2}
:
x_{N,1}
y_{N,1}
x_{N,2}
y_{N,2}
Output
Print
YES
if the objective is achievable; print
NO
otherwise.
Sample Input 1
4 2 3
0 1 3 1
1 1 4 1
2 0 2 2
Sample Output 1
YES
The above figure shows a possible solution.
Sample Input 2
2 2 4
0 0 2 2
2 0 0 1
0 2 1 2
1 1 2 1
Sample Output 2
NO
Sample Input 3
5 5 7
0 0 2 4
2 3 4 5
3 5 5 2
5 5 5 4
0 3 5 1
2 2 4 4
0 5 4 1
Sample Output 3
YES
Sample Input 4
1 1 2
0 0 1 1
1 0 0 1
Sample Output 4
NO
Problem Description: Score : 1000 points
Problem Statement
There are
M
chairs arranged in a line. The coordinate of the
i
-th chair
(1 ≤ i ≤ M)
is
i
.
N
people of the Takahashi clan played too much games, and they are all suffering from backaches. They need to sit in chairs and rest, but they are particular about which chairs they sit in. Specifically, the
i
-th person wishes to sit in a chair whose coordinate is not greater than
L_i
, or not less than
R_i
. Naturally, only one person can sit in the same chair.
It may not be possible for all of them to sit in their favorite chairs, if nothing is done.
Aoki, who cares for the health of the people of the Takahashi clan, decides to provide additional chairs so that all of them can sit in chairs at their favorite positions.
Additional chairs can be placed at arbitrary real coordinates. Find the minimum required number of additional chairs.
Constraints
1 ≤ N,M ≤ 2 × 10^5
0 ≤ L_i < R_i ≤ M + 1(1 ≤ i ≤ N)
All input values are integers.
Input
Input is given from Standard Input in the following format:
N
M
L_1
R_1
:
L_N
R_N
Output
Print the minimum required number of additional chairs.
Sample Input 1
4 4
0 3
2 3
1 3
3 4
Sample Output 1
0
The four people can sit in chairs at the coordinates
3
,
2
,
1
and
4
, respectively, and no more chair is needed.
Sample Input 2
7 6
0 7
1 5
3 6
2 7
1 6
2 6
3 7
Sample Output 2
2
If we place additional chairs at the coordinates
0
and
2.5
, the seven people can sit at coordinates
0
,
5
,
3
,
2
,
6
,
1
and
2.5
, respectively.
Sample Input 3
3 1
1 2
1 2
1 2
Sample Output 3
2
Sample Input 4
6 6
1 6
1 6
1 5
1 5
2 6
2 6
Sample Output 4
2
Problem Description: Score : 300 points
Problem Statement
Snuke can change a string
t
of length
N
into a string
t'
of length
N - 1
under the following rule:
For each
i
(
1 ≤ i ≤ N - 1
), the
i
-th character of
t'
must be either the
i
-th or
(i + 1)
-th character of
t
.
There is a string
s
consisting of lowercase English letters.
Snuke's objective is to apply the above operation to
s
repeatedly so that all the characters in
s
are the same.
Find the minimum necessary number of operations.
Constraints
1 ≤ |s| ≤ 100
s
consists of lowercase English letters.
Input
Input is given from Standard Input in the following format:
s
Output
Print the minimum necessary number of operations to achieve the objective.
Sample Input 1
serval
Sample Output 1
3
One solution is:
serval
→
srvvl
→
svvv
→
vvv
.
Sample Input 2
jackal
Sample Output 2
2
One solution is:
jackal
→
aacaa
→
aaaa
.
Sample Input 3
zzz
Sample Output 3
0
All the characters in
s
are the same from the beginning.
Sample Input 4
whbrjpjyhsrywlqjxdbrbaomnw
Sample Output 4
8
In
8
operations, he can change
s
to
rrrrrrrrrrrrrrrrrr
.
Problem Description: Score : 700 points
Problem Statement
There are
N
cats.
We number them from
1
through
N
.
Each of the cats wears a hat.
Cat
i
says: "there are exactly
a_i
different colors among the
N - 1
hats worn by the cats except me."
Determine whether there exists a sequence of colors of the hats that is consistent with the remarks of the cats.
Constraints
2 ≤ N ≤ 10^5
1 ≤ a_i ≤ N-1
Input
Input is given from Standard Input in the following format:
N
a_1
a_2
...
a_N
Output
Print
Yes
if there exists a sequence of colors of the hats that is consistent with the remarks of the cats; print
No
otherwise.
Sample Input 1
3
1 2 2
Sample Output 1
Yes
For example, if cat
1
,
2
and
3
wears red, blue and blue hats, respectively, it is consistent with the remarks of the cats.
Sample Input 2
3
1 1 2
Sample Output 2
No
From the remark of cat
1
, we can see that cat
2
and
3
wear hats of the same color.
Also, from the remark of cat
2
, we can see that cat
1
and
3
wear hats of the same color.
Therefore, cat
1
and
2
wear hats of the same color, which contradicts the remark of cat
3
.
Sample Input 3
5
4 3 4 3 4
Sample Output 3
No
Sample Input 4
3
2 2 2
Sample Output 4
Yes
Sample Input 5
4
2 2 2 2
Sample Output 5
Yes
Sample Input 6
5
3 3 3 3 3
Sample Output 6
No
Problem Description: Score : 1400 points
Problem Statement
There are
N
turkeys.
We number them from
1
through
N
.
M
men will visit here one by one.
The
i
-th man to visit will take the following action:
If both turkeys
x_i
and
y_i
are alive: selects one of them with equal probability, then eats it.
If either turkey
x_i
or
y_i
is alive (but not both): eats the alive one.
If neither turkey
x_i
nor
y_i
is alive: does nothing.
Find the number of pairs
(i,\ j)
(
1 ≤ i < j ≤ N
) such that the following condition is held:
The probability of both turkeys
i
and
j
being alive after all the men took actions, is greater than
0
.
Constraints
2 ≤ N ≤ 400
1 ≤ M ≤ 10^5
1 ≤ x_i < y_i ≤ N
Input
Input is given from Standard Input in the following format:
N
M
x_1
y_1
x_2
y_2
:
x_M
y_M
Output
Print the number of pairs
(i,\ j)
(
1 ≤ i < j ≤ N
) such that the condition is held.
Sample Input 1
3 1
1 2
Sample Output 1
2
(i,\ j) = (1,\ 3), (2,\ 3)
satisfy the condition.
Sample Input 2
4 3
1 2
3 4
2 3
Sample Output 2
1
(i,\ j) = (1,\ 4)
satisfies the condition.
Both turkeys
1
and
4
are alive if:
The first man eats turkey
2
.
The second man eats turkey
3
.
The third man does nothing.
Sample Input 3
3 2
1 2
1 2
Sample Output 3
0
Sample Input 4
10 10
8 9
2 8
4 6
4 9
7 8
2 8
1 8
3 4
3 4
2 7
Sample Output 4
5
Problem Description: Score : 100 points
Problem Statement
AtCoDeer has three cards, one red, one green and one blue.
An integer between
1
and
9
(inclusive) is written on each card:
r
on the red card,
g
on the green card and
b
on the blue card.
We will arrange the cards in the order red, green and blue from left to right, and read them as a three-digit integer.
Is this integer a multiple of
4
?
Constraints
1 ≤ r, g, b ≤ 9
Input
Input is given from Standard Input in the following format:
r
g
b
Output
If the three-digit integer is a multiple of
4
, print
YES
(case-sensitive); otherwise, print
NO
.
Sample Input 1
4 3 2
Sample Output 1
YES
432
is a multiple of
4
, and thus
YES
should be printed.
Sample Input 2
2 3 4
Sample Output 2
NO
234
is not a multiple of
4
, and thus
NO
should be printed.
Problem Description: Score : 200 points
Problem Statement
It is only six months until Christmas, and AtCoDeer the reindeer is now planning his travel to deliver gifts.
There are
N
houses along
TopCoDeer street
. The
i
-th house is located at coordinate
a_i
. He has decided to deliver gifts to all these houses.
Find the minimum distance to be traveled when AtCoDeer can start and end his travel at any positions.
Constraints
1 ≤ N ≤ 100
0 ≤ a_i ≤ 1000
a_i
is an integer.
Input
Input is given from Standard Input in the following format:
N
a_1
a_2
...
a_N
Output
Print the minimum distance to be traveled.
Sample Input 1
4
2 3 7 9
Sample Output 1
7
The travel distance of
7
can be achieved by starting at coordinate
9
and traveling straight to coordinate
2
.
It is not possible to do with a travel distance of less than
7
, and thus
7
is the minimum distance to be traveled.
Sample Input 2
8
3 1 4 1 5 9 2 6
Sample Output 2
8
There may be more than one house at a position.
Problem Description: Score : 300 points
Problem Statement
In AtCoder, a person who has participated in a contest receives a
color
, which corresponds to the person's rating as follows:
Rating
1
-
399
: gray
Rating
400
-
799
: brown
Rating
800
-
1199
: green
Rating
1200
-
1599
: cyan
Rating
1600
-
1999
: blue
Rating
2000
-
2399
: yellow
Rating
2400
-
2799
: orange
Rating
2800
-
3199
: red
Other than the above, a person whose rating is
3200
or higher can freely pick his/her color, which can be one of the eight colors above or not.
Currently, there are
N
users who have participated in a contest in AtCoder, and the
i
-th user has a rating of
a_i
.
Find the minimum and maximum possible numbers of different colors of the users.
Constraints
1 ≤ N ≤ 100
1 ≤ a_i ≤ 4800
a_i
is an integer.
Input
Input is given from Standard Input in the following format:
N
a_1
a_2
...
a_N
Output
Print the minimum possible number of different colors of the users, and the maximum possible number of different colors, with a space in between.
Sample Input 1
4
2100 2500 2700 2700
Sample Output 1
2 2
The user with rating
2100
is "yellow", and the others are "orange". There are two different colors.
Sample Input 2
5
1100 1900 2800 3200 3200
Sample Output 2
3 5
The user with rating
1100
is "green", the user with rating
1900
is blue and the user with rating
2800
is "red".
If the fourth user picks "red", and the fifth user picks "blue", there are three different colors. This is one possible scenario for the minimum number of colors.
If the fourth user picks "purple", and the fifth user picks "black", there are five different colors. This is one possible scenario for the maximum number of colors.
Sample Input 3
20
800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990
Sample Output 3
1 1
All the users are "green", and thus there is one color.
Problem Description: Score : 400 points
Problem Statement
You are given a string
S
of length
N
consisting of
(
and
)
. Your task is to insert some number of
(
and
)
into
S
to obtain a
correct bracket sequence
.
Here, a correct bracket sequence is defined as follows:
()
is a correct bracket sequence.
If
X
is a correct bracket sequence, the concatenation of
(
,
X
and
)
in this order is also a correct bracket sequence.
If
X
and
Y
are correct bracket sequences, the concatenation of
X
and
Y
in this order is also a correct bracket sequence.
Every correct bracket sequence can be derived from the rules above.
Find the shortest correct bracket sequence that can be obtained. If there is more than one such sequence, find the lexicographically smallest one.
Constraints
The length of
S
is
N
.
1 ≤ N ≤ 100
S
consists of
(
and
)
.
Input
Input is given from Standard Input in the following format:
N
S
Output
Print the lexicographically smallest string among the shortest correct bracket sequences that can be obtained by inserting some number of
(
and
)
into
S
.
Sample Input 1
3
())
Sample Output 1
(())
Sample Input 2
6
)))())
Sample Output 2
(((()))())
Sample Input 3
8
))))((((
Sample Output 3
(((())))(((())))
Problem Description: Score : 100 points
Problem Statement
You are given two integers
A
and
B
as the input. Output the value of
A + B
.
However, if
A + B
is
10
or greater, output
error
instead.
Constraints
A
and
B
are integers.
1 ≤ A, B ≤ 9
Input
Input is given from Standard Input in the following format:
A
B
Output
If
A + B
is
10
or greater, print the string
error
(case-sensitive); otherwise, print the value of
A + B
.
Sample Input 1
6 3
Sample Output 1
9
Sample Input 2
6 4
Sample Output 2
error
Problem Description: Score : 200 points
Problem Statement
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 1
uncopyrightable
Sample Output 1
yes
Sample Input 2
different
Sample Output 2
no
Sample Input 3
no
Sample Output 3
yes