Measures

아직 제출이 없습니다시간 제한1.5초메모리 제한512 MB

문제

The COVID-19 pandemic took the world by surprise in many ways. Almost overnight, people around the globe had to adapt to a new way of life, mainly shaped by the preventive measures issued by their local authorities, all with the goal of suppressing and controlling the spread of the disease.

To better prepare for the unlikely event of a more devastating outbreak in the far future, the Croatian National Institute of Public Health decided to open various research departments. The main goal of these departments is to develop highly efficient protocols that help the general population to quickly adhere to a new preventive measure.

Alenka works in one such department, and is currently investigating the scenario in which a group of people stands in a line, e.g. in front of a post office, and suddenly a new safety measure takes place, mandating that distance between any two people has to be at least DD.

She also implemented an app that allows the user to specify a distance DD and locations of NN people as coordinates along a line. The app then draws a picture of a line which represents the situation, and calculates the smallest amount of time in seconds, denoted as t_optt\_{opt}, needed for the group to reach a new arrangement that satisfies the preventive measure. The app assumes that people are going to immediately start rearranging themselves optimally, and that all people move with the same constant speed of one unit per second.

She now wants to add a new feature that will enable the user to add MM additional people to the group by tapping on the drawn line, thereby specifying their locations. The app is supposed to recalculate t_optt\_{opt} after each tap, i.e. after each new person is added to the group.

Your task is to help Alenka by implementing this feature.

입력

The first line contains integers NN, MM, and DD from the task description.

The second line contains NN integers a_1,,a_Na\_1, \dots , a\_N, the locations of the NN initial people.

The third line contains MM integers b_1,,b_Mb\_1, \dots , b\_M, the locations of the MM additional people.

출력

Output MM numbers in one line, the ii-th of them representing the value of t_optt\_{opt} given that the group consists of (N+i)(N + i) people at locations a_1,a_2,,a_N,b_1,,b_ia\_1, a\_2, \dots , a\_N , b\_1, \dots , b\_i.

Output each number in decimal notation without trailing zeroes, e.g. output 1.23 instead of 1.2300, and 123 instead of 123. or 123.0. It can be proven that answers always have a finite decimal representation..

제한

In all subtasks it holds that 1D,a_1,,a_N,b_1,,b_M1091 ≤ D, a\_1, \dots , a\_N , b\_1, \dots , b\_M ≤ 10^9.