|
|
Добавьте тесты, где точки пересечения прямых очень далеко, и эти прямые почти параллельны. Моя AC программа не проходит тесты: -1000 -1000 -999 1000 0 -1000 1 999 999 -1000 1000 998 -1000 -1000 -999 1000 998 -1000 999 999 999 -1000 1000 1000 Solved numerically, but with complete botva. Is there some beautiful geometric solution? If yes - any clues how to do it? Thanks. There is really beautiful geometric solution. Try to think about rotation. My solution is geometric with little cheat (3 cases, 2 solves geometrically, in third (3 lines have one point of intersection) - answer is any triandle with length of edge 1.1*1e-6 and center in the point of intersection), but WA21 :( Edited by author 05.05.2013 02:07 Edited by author 05.05.2013 02:07 Edited by author 05.05.2013 02:07 Is it guaranteed, Captain Jack Sparrow, Pintel and Ragetti are located at the same point? The second test tells you 'No'. |
|
|