ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1815. Farm in San Andreas

Hint
Posted by Jorjia 6 Oct 2018 19:50
I can't solve it, yet.
But i think that, it solviable as fermat point geometry construction (see wiki), and using angles, as Shen Yang suggested
<AOB = acos((c1*c1-c2*c2-c3*c3)/(2*c2*c3)),
<AOC = acos((c2*c2-c1*c1-c3*c3)/(2*c1*c3) and

<BOC = acos((c3*c3-c1*c1-c2*c2)/(2*c1*c2)) .
(c1,c2,c3 - are prices).
In wiki fermat point: constructed   triangles ABC'  , BCA'   and CAB'
where
<ABC' = 60, <BAC' = 60,
<CBA' = 60, <BCA' = 60,   and
<ACB' = 60, <CAB' = 60.

 Fermat point X - is intersection of AA'  and BB' and CC'  lines.

In there, we must construct triangles ABC' , BCA', and CAB' , with
<ABC' = <BAC' = <AOB / 2
<BCA' = <CBA' = <COB / 2
<ACB' = <CAB' = <AOC / 2

and intersection of AA'  , BB' and CC' - will be ans, iff it's in ABC triangle. otherwice A, B, or C will be ans.