Horizontally Visible Segments

POJ - 1436