134. Alarming String

Codeforces
IDCF10269134
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You define a string to be an _alarming string_ if it contains exactly three "a" characters. Given a string, possibly containing spaces, figure out whether or not it is an alarming string. The only line of input contains a single string $s$, consisting of only lowercase characters. Output "YES" (no quotes) if the given string is an alarming string, as described above, and "NO" (no quotes) otherwise. ## Input The only line of input contains a single string $s$, consisting of only lowercase characters. ## Output Output "YES" (no quotes) if the given string is an alarming string, as described above, and "NO" (no quotes) otherwise. [samples]
**Definitions** Let $ s $ be a string over the alphabet $ \{a, b, \dots, z\} \cup \{\text{space}\} $. **Constraints** - $ s $ consists only of lowercase Latin letters and spaces. **Objective** Determine whether the number of occurrences of the character 'a' in $ s $ is exactly 3. That is, output "YES" if $ \#_{a}(s) = 3 $, otherwise output "NO".
API Response (JSON)
{
  "problem": {
    "name": "134. Alarming String",
    "description": {
      "content": "You define a string to be an _alarming string_ if it contains exactly three \"a\" characters. Given a string, possibly containing spaces, figure out whether or not it is an alarming string. The only li",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269134"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You define a string to be an _alarming string_ if it contains exactly three \"a\" characters. Given a string, possibly containing spaces, figure out whether or not it is an alarming string.\n\nThe only li...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ s $ be a string over the alphabet $ \\{a, b, \\dots, z\\} \\cup \\{\\text{space}\\} $.\n\n**Constraints**  \n- $ s $ consists only of lowercase Latin letters and spaces.\n\n**Objective**  ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments