K-clearing
题号:NC219811
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

You are given an array of integers. You have to clearing all elements equal to in this array.
When there is at least one element equal to in the array, then you should make all the positive elements in the array minus one. In other words, .
When the array does not have any element equal to , please output the array.

输入描述:

The first line contains two integers  ,  — the length of  and the number we need to clear.
The second line contains integers .

输出描述:

Output the array when the array does not have any element equal to  .
Please do not output extra blank spaces at the end of the output.
示例1

输入

复制
5 1
5 2 3 4 1

输出

复制
0 0 0 0 0
示例2

输入

复制
6 1
1 1 4 5 1 4

输出

复制
0 0 3 4 0 3