A new cottage village called «Flatville» is being built in Flatland. By now they have already built in «Flatville» n square houses with the centres on the Оx-axis. The houses' sides are parallel to the coordinate axes. It's known that no two houses overlap, but they can touch each other.
The architect bureau, where Peter works, was commissioned to build a new house in «Flatville». The customer wants his future house to be on the Оx-axis, to be square in shape, have a side t, and touch at least one of the already built houses. For sure, its sides should be parallel to the coordinate axes, its centre should be on the Ox-axis and it shouldn't overlap any of the houses in the village.
Peter was given a list of all the houses in «Flatville». Would you help him find the amount of possible positions of the new house?
一个新山村建立起来了,目前为止山村中已建了n个平房。房屋的边都与x轴平行,没有任何两个房屋重叠,但房屋间可以相互接触。一个公司想在这个山村建一栋方形新房屋,
边长为 t,而且至少与一栋已有房屋互相接触。它的中心要在x轴上,且不与任何房屋重叠。请你求出新房屋共有多少种可能位置?