A - abc of ABC
Editorial
/
Time Limit: 2 sec / Memory Limit: 256 MB
配点 : 100 点
問題文
a
,b
,c
からなる長さ 3 の文字列 S が与えられます。S を abc
を並び替えて作ることができるかどうか判定してください。
制約
- |S|=3
- S は
a
,b
,c
からなる
入力
入力は以下の形式で標準入力から与えられる。
S
出力
S を abc
を並び替えて作ることができるなら Yes
を、そうでないなら No
を出力せよ。
入力例 1
bac
出力例 1
Yes
bac
の 1 文字目と 2 文字目を入れ替えると abc
になります。
入力例 2
bab
出力例 2
No
入力例 3
abc
出力例 3
Yes
入力例 4
aaa
出力例 4
No
Score : 100 points
Problem Statement
You are given a string S of length 3 consisting of a
, b
and c
. Determine if S can be obtained by permuting abc
.
Constraints
- |S|=3
- S consists of
a
,b
andc
.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting abc
, print Yes
; otherwise, print No
.
Sample Input 1
bac
Sample Output 1
Yes
Swapping the first and second characters in bac
results in abc
.
Sample Input 2
bab
Sample Output 2
No
Sample Input 3
abc
Sample Output 3
Yes
Sample Input 4
aaa
Sample Output 4
No