Блог пользователя restart.

Автор restart., 10 лет назад, По-английски

How could i solve this problem lightoj-1056 using binary search? i solved some problems using binary search. please anybody can help me what should be my strategy to solve this problem using binary search??

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится +4 Проголосовать: не нравится

I don't think binary search is needed . Since arcs are part of same circle , so first determine the radius r. From triangle (r,l/2,w/2 ) we get r^2=(l/2)^2 + (w/2)^2 From (r,r,w) triangle sector angle from cos law. then arc= angle *r so the perimeter of stadium is 2*l + 2*arc and you can get ratio=400/(2*l + 2*arc) then ans is l*ratio , w*ratio

Hope it helps . :)