Let $x$ be the smallest real number s.t. there are at least two building intersect with the line, then the range of real number to be able to see all building is $(x, \infty)$. When $x \ge 0$, output $x$ is consider correct just because it have arbitrarily small relative error to the correct answer rather than it's visible on $x$, and when $x < 0$, $0$ is visible and the problem ask you to output $-1$ in such case.
Let $x$ be the smallest real number s.t. there are at least two building intersect with the line, then the range of real number to be able to see all building is $(x, \infty)$. When $x \ge 0$, output $x$ is consider correct just because it have arbitrarily small relative error to the correct answer rather than it's visible on $x$, and when $x < 0$, $0$ is visible and the problem ask you to output $-1$ in such case.