186. Radio Filtration

Codeforces
IDCF10269186
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You're listening to the radio, and you have a "voice to text" machine that transcribes the radio's words. The machine transcribes some of the static of the radio, however, which it writes as certain random characters. The machine writes an underscore character before and after any static that it transcribes. Your task is to filter out the static and print the original message. For example, if the machine transcribed "hello wor_xxxxxxxhsfdjsdkkdsfds_ld coderams", the filtered out text would be "hello world coderams". The only line of input contains a line of text, following the rules above. Output a single line: the text, after filtering out the static, as described above. ## Input The only line of input contains a line of text, following the rules above. ## Output Output a single line: the text, after filtering out the static, as described above. [samples]
**Definitions** Let $ S $ be a string over the alphabet $ \Sigma = \{ \text{printable ASCII characters} \} \cup \{ \_ \} $. **Constraints** - Underscore characters $ \_ $ appear only as delimiters for static: every static segment is enclosed by exactly two underscores, i.e., patterns of the form `_..._` where `...` contains no underscores. - Underscores not part of a `_..._` pair do not occur (i.e., underscores always appear in balanced pairs delimiting static). - Static content between underscores consists of any characters except underscores. **Objective** Remove all substrings of the form `_..._` (including the underscores) and concatenate the remaining parts to form the filtered string $ S' $.
API Response (JSON)
{
  "problem": {
    "name": "186. Radio Filtration",
    "description": {
      "content": "You're listening to the radio, and you have a \"voice to text\" machine that transcribes the radio's words. The machine transcribes some of the static of the radio, however, which it writes as certain r",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269186"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You're listening to the radio, and you have a \"voice to text\" machine that transcribes the radio's words. The machine transcribes some of the static of the radio, however, which it writes as certain r...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ S $ be a string over the alphabet $ \\Sigma = \\{ \\text{printable ASCII characters} \\} \\cup \\{ \\_ \\} $.  \n\n**Constraints**  \n- Underscore characters $ \\_ $ appear only as delimit...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments