AtCoder Beginner Contest 191
B
Remove It
AtCoder
⌀ 0
原题
← AC →
翻译中…

Problem Statement

翻译中…

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

翻译中…

Output

翻译中…

Print the elements of $A'$ in order, with space in between.

翻译中…

样例

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.
题目信息
题号
abc191_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。