P3515 [POI 2011] Lightning Conductor
题目描述
Progressive climate change has forced the Byteburg authorities to build a huge lightning conductor that would protect all the buildings within the city.
These buildings form a row along a single street, and are numbered from  to .
The heights of the buildings and the lightning conductor are non-negative integers.
Byteburg's limited funds allow construction of only a single lightning conductor.
Moreover, as you would expect, the higher it will be, the more expensive.
The lightning conductor of height  located on the roof of the building  (of height ) protects the building  (of height ) if the following inequality holds:
 where  denotes the absolute value of the difference between  and .
Byteasar, the mayor of Byteburg, asks your help.
Write a program that, for every building , determines the minimum height of a lightning conductor that would protect all the buildings if it were put on top of the building .
输入格式
无
输出格式
无