|
|
back to boardWhat is wrong? I cannot find to my mistake!!! At me a problem with third the test Here my algorithm: 1. I write down minimal a distance from a point up to a square: Whether I look the point in a square, that is when the answer 0 lays. Here I used vectors! If the point does not lay in a square I make it: I Search for a straight line which lays more close to the given point. Then I create a triangle and I search for height of this triangle. Whether but I look all corners at a basis of a triangle blunt if is not present I choose the minimal distance from given to a point up to points of a straight line. 2. I sort Here my algorithm, in what a problem? Help!!!
|
|
|