#10566 - Crossed Ladders

Solved By:wesley
Theory Difficulty:easy
Coding Difficulty:easy
Algorithms Used:2D geometry
searching
Solution Description: Binary search on the width of the road. The initial bounds are 0 and min(x,y).

Given the width of the road, and the length of the ladders, you can find the intersection of the two lines. If the y-value of the intersection is greater than c, increase the width of the road. Otherwise, decrease it.






Copyright 2008 (c) QuestToSolve.Com - Graphs Powered By PHPGraphLib - Click For Official Site