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 1348. Goat in the Garden 2

If you are too lazy to solve it yourself read that spoiler
Posted by Mahilewets 31 May 2017 11:31
You can solve it using :
(1) canonical straight line formula for perpendicular length ;
(2) cosine theorem to know whether your perpendicular length is the answer to the first question or not;
(3) Just formula for Euclidian distance and maximum function to answer the second question.