|
|
Does any one know that case? Edited by author 24.01.2011 10:45 Could someone give me a hint, please? I have WA #32 using doubles only for output, so it doesn't seem to be an accuracy problem. Have found counterexample. use double more broadly and small precision 10^-4 guaranties comfort 7 3 6 8 3 8 1 7 0 3 4 0 6 1 9 6 If you draw this polygon on paper, you understand yours mistake ;) Edited by author 06.03.2009 21:05 By the way the correct answer is 0.38528021 I have WA 12 too. I understood why my solution is wrong. So, what the idea of right solution? I think that my AC solution returns wrong answer on this test: 10 4 5 0 10 1 19 7 22 13 21 19 14 21 4 17 1 14 0 10 2 3 I supposed that the convex cover of intersection points of segments-cords (don't including vertexes of polygon) is unreachable for rabbit, but this idea is wrong. My AC program answers 0.52855475 and I'm quite sure in it. Does your answer differ from this? Yes, my answer is 0,5441032266 n=7 k=3 fence has more than 2n angles You are devilishly right! I figured it out when i drew a polygon of shape far from regular. But it incredibly complicates the solution :(( Not really.If I understand your algo correctly,than it only needs to be improved a little. Theoretically,my algo is O(n^3),but in tests my prog works less than 0,05 sec,because there're no such polygons,for which all the operations will be required. Edited by author 06.03.2009 02:14 In the condition it's said "accurate to 10−4", but in the examples the output contains much more digits. It means that checker will take the difference of your answer and correct answer and if it less than 1e-4 than your answer is correct. So you can display any number of digits. In my solution I display 10 digits after point Ok, thanks for explanation. Nevertheless this is not the cause why i can't AC. Can anybody say what trick is in the test #12? |
|
|