|
|
I spent two hours finding this stupid mistake. Do not be like me, do everything with a margin. My idea: 1) if triangle is right, answer is obvious) 2) if triangle is equilateral, there is no solution 3) in other cases try to split the triangle into 2 right triangles to get coordinates Correct me if I'm wrong or give test which fail that algo. 17,65,80 result: 0 0 33 -56 48 -64 Edited by author 18.07.2019 20:22 Edited by author 18.07.2019 20:25 Edited by author 18.07.2019 20:26 My algo is O(max(a,b,c)). Edited by author 27.03.2016 21:21 Give me some input values with answers, please, so I could find out, what's wrong. My Accepted solution #6069000 will fail if you add all permutations of test 32 as separate tests. There are all the numbers are greater than 1000000 in the test 6! Please remove this test or fix the description of the problem. P.S. After I discovered it I solved the problem anyway :) Thank you! Russian and English statements had different constraints. Now both have 10^7 for input lengths. |
|
|