UVa Problem 10360 - a proposed fix to kdtree bug