Remove It

AtCoder
IDabc191_b
Time2000ms
Memory256MB
Difficulty
Given are an integer sequence $A$ of length $N$, and an integer $X$. Remove all elements that are equal to $X$ from $A$, and arrange the remaining elements without changing the order to obtain the sequence $A'$. Print $A'$. ## Constraints * $1 \le N \le 10^5$ * $1 \le X \le 10^9$ * $1 \le A_i \le 10^9$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $N$ $X$ $A_1$ $A_2$ $A_3$ $\dots$ $A_N$ [samples]
Samples
Input #1
5 5
3 5 6 5 4
Output #1
3 6 4

Removing $5$s from $[3, 5, 6, 5, 4]$ results in $[3, 6, 4]$.
Input #2
3 3
3 3 3
Output #2
$A'$ can be a sequence with zero elements, in which case we should just print an empty line.
API Response (JSON)
{
  "problem": {
    "name": "Remove It",
    "description": {
      "content": "Given are an integer sequence $A$ of length $N$, and an integer $X$.   Remove all elements that are equal to $X$ from $A$, and arrange the remaining elements without changing the order to obtain the s",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc191_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Given are an integer sequence $A$ of length $N$, and an integer $X$.  \nRemove all elements that are equal to $X$ from $A$, and arrange the remaining elements without changing the order to obtain the s...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments