AKIBA

AtCoder
IDcf17_final_a
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
KIHBR
Output #1
YES

Insert one `A` at each of the four positions: the beginning, immediately after `H`, immediately after `B` and the end.
Input #2
AKIBAHARA
Output #2
NO

The correct spell is `AKIHABARA`.
Input #3
AAKIAHBAARA
Output #3
NO
API Response (JSON)
{
  "problem": {
    "name": "AKIBA",
    "description": {
      "content": "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`?",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "cf17_final_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$.\nTakahashi can insert the character `A` at any position in this string any number of times.\nCan he change $S$ into `AKIHABARA`?\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 50$\n*  ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments