062. Delete Characters

Codeforces
IDCF10269062
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Given a string S and a list of characters C, print string S after removing all of the characters given in list C. The first line is the string S to be modified. The second line contains integer N, which is the number of different characters to be deleted. The following N lines contain the characters to be deleted. A single string S after deleting all of the characters that are given to be deleted. ## Input The first line is the string S to be modified. The second line contains integer N, which is the number of different characters to be deleted. The following N lines contain the characters to be deleted. ## Output A single string S after deleting all of the characters that are given to be deleted. [samples]
**Definitions** Let $ S \in \Sigma^* $ be the input string over alphabet $ \Sigma $. Let $ N \in \mathbb{Z}^+ $ be the number of characters to remove. Let $ C = \{c_1, c_2, \dots, c_N\} \subseteq \Sigma $ be the set of characters to be deleted. **Constraints** 1. $ N \geq 1 $ 2. Each $ c_i \in \Sigma $ **Objective** Compute the string $ S' $ formed by removing all occurrences of characters in $ C $ from $ S $: $$ S' = \text{filter}_{x \notin C}(S) $$
API Response (JSON)
{
  "problem": {
    "name": "062. Delete Characters",
    "description": {
      "content": "Given a string S and a list of characters C, print string S after removing all of the characters given in list C. The first line is the string S to be modified. The second line contains integer N, wh",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269062"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Given a string S and a list of characters C, print string S after removing all of the characters given in list C.\n\nThe first line is the string S to be modified. The second line contains integer N, wh...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ S \\in \\Sigma^* $ be the input string over alphabet $ \\Sigma $.  \nLet $ N \\in \\mathbb{Z}^+ $ be the number of characters to remove.  \nLet $ C = \\{c_1, c_2, \\dots, c_N\\} \\subsete...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments