Comment

avatar username

The first one is correct behavior according to the definition in the problem

From a point P with coordinate x and height h, building i is considered visible if there exists a point Q on building i such that the line segment PQ does not intersect with any other building.

For the second one, I guess it would work as long as $L = 0, R = 2^k$ for big enough $k$? Not sure how to estimate the error but it feel reasonable to have less error when $R$ is power of $2$ since computer store everything in binary. I also trapped on this one, guess it's a lesson to learn :P

The actual rating of this user is 2422.

Original comment.

Statistics