#P15859. [蓝桥杯第二届国际赛] 模糊滤镜
[蓝桥杯第二届国际赛] 模糊滤镜
Background
It is uncertain whether this problem is included in the Lanqiao Cup 2nd International Contest. The official Lanqiao Cup statement crossed out the problem number, but the problem itself is still kept.
Problem Description
For an ordered signal , each number in the signal is a positive integer. When applying a blur filter to this signal, a new signal is obtained. The values of the new signal are defined as , , , , , , where denotes the greatest integer not exceeding .
Now the blurred signal is given. Please compute the signal . If there are multiple valid , find the one with the smallest . If there are multiple solutions with the same , find the one with the smallest , and so on. In other words, find the lexicographically smallest sequence .
Input Format
The first line contains an integer .
The second line contains integers, which are in order.
Output Format
Output one line containing integers, representing in order. Note that every number in must be a positive integer.
5
1 2 3 4 5
1 1 4 4 6
Hint
Constraints
For of the test cases, , and each number in the signal is a positive integer not exceeding .
For of the test cases, , and each number in the signal is a positive integer not exceeding .
For all test cases, , and each number in the signal is a positive integer not exceeding .
Please note that the above ranges apply to each number in the signal . Each number in the signal may exceed this range.
Translated by ChatGPT 5