题目描述
Problem Description
Kenkoooo works at SoundHound Inc. Today, he decided to create a feature for adjusting the volume.
This feature outputs a certain volume level for each second of input given over $ n $ seconds. Let $ a_i $ be the input for the $ i $-th second. If $ a_i $ is below the lower limit $ L $, the output is $ L $. If $ a_i $ exceeds the upper limit $ R $, the output is $ R $. Otherwise, the output is $ a_i $. Given the inputs $ a_i $ for $ n $ seconds, and the values $ L $ and $ R $, write a program to obtain the $ n $ outputs $ b_i $.
Input Format
The input is given from the standard input in the following format:
$ n $ $ L $ $ R $ $ a_1 $ $ ... $ $ a_n $
Output Format
Output the $ b_i $ in ascending order of $ i $.
Sample Input and Output
Sample Input #1
4 2 3
1 4 2 3
Sample Output #1
2 3 2 3
Sample Input #2
3 1 10
3 3 4
Sample Output #2
3 3 4
Sample Input #3
1 3 3
3
Sample Output #3
3
Notes/Hints
Constraints
- $1 \leq n \leq 10^5$
- $1 \leq a_i \leq 10^5$
- $1 \leq L \leq R \leq 10^5$
Sample Explanation 1
- For $ a_1 (=1) $, since it is below the lower limit $ L (=2) $, output $ L $.
- For $ a_2 (=4) $, since it exceeds the upper limit $ R (=3) $, output $ R $.
- For $ a_3 $ and $ a_4 $, output them as they are.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分