|
|
Show all threads Hide all threads Show all messages Hide all messages | Bad statement | andreyDagger | 2121. Intersection of Parabolas | 27 Feb 2022 17:09 | 1 | Spent a hour to realise that you don't need to count left and right parts of figure, only middle | Precision errors? | Timothy Mou | 2121. Intersection of Parabolas | 3 Jun 2019 20:29 | 3 | I believe I am having precision errors when calculating the solution. I changed from doubles to long doubles and got one more test case, so I believe my solution is correct but not precise enough. Any tips to resolve this? Never mind, there was simplification in the calculations and then I just hard-coded printed out the decimals. This problem is just cancer Yes Some tests: a = 1 ans = 3.666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 a = 1.5 ans = 5.666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 a = 666 ans = 2663.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666674 a = 1000000000000000000 ans = 3999999999999999999.666666666666666666666666666666666666666666666666666666666666666333333333 Edited by author 03.06.2019 20:30 | Any proof? | bsu.mmf.team | 2121. Intersection of Parabolas | 20 May 2019 18:15 | 1 | |
|
|
|