/
実行時間制限: 2 sec / メモリ制限: 256 MiB
配点 : 300 点
問題文
文字列 S が与えられます。
高橋君はこの文字列の好きな位置に好きなだけ文字 A を挿入することができます。
S を AKIHABARA に変えることはできるでしょうか?
制約
- 1 \leq |S| \leq 50
- S は大文字アルファベットのみからなる。
入力
入力は以下の形式で標準入力から与えられる。
S
出力
S を AKIHABARA に変えることができる場合は YES、できない場合は NO を出力せよ。
入力例 1
KIHBR
出力例 1
YES
先頭、Hの直後、Bの直後、末尾の 4 箇所に 1 つずつ挿入すれば良いです。
入力例 2
AKIBAHARA
出力例 2
NO
AKIHABARA が正しい綴りです。
入力例 3
AAKIAHBAARA
出力例 3
NO
Score : 300 points
Problem Statement
You are given a string S.
Takahashi can insert the character A at any position in this string any number of times.
Can he change S into AKIHABARA?
Constraints
- 1 \leq |S| \leq 50
- S consists of uppercase English letters.
Input
Input is given from Standard Input in the following format:
S
Output
If it is possible to change S into AKIHABARA, print YES; otherwise, print NO.
Sample Input 1
KIHBR
Sample Output 1
YES
Insert one A at each of the four positions: the beginning, immediately after H, immediately after B and the end.
Sample Input 2
AKIBAHARA
Sample Output 2
NO
The correct spell is AKIHABARA.
Sample Input 3
AAKIAHBAARA
Sample Output 3
NO