#10566 - Crossed Ladders
|Algorithms Used:||2D geometry|
|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