|
|
вернуться в форумInteresting problem.. I'm very puzzled with it. Could anybody give me a hint? Re: Interesting problem.. One of ideas (didn't implement it yet): 1) sort all trees on their angle (for every bank) 2) for each ray from origin keep only one tree on that ray. 3) rotate a line sequentially - this way you'll get all different captures for each bank at O(N*log(N)) 4) perform hashing for images on the other bank so that hash value can be updated at not more than O(log(N)) with each rotation. E.g. base-360 number with angles-to-leftmost-tree as digits can be updated at O(1) with each increment, including consideration of scaling factor. 5) for each image on one bank try to find corresponding image for the other using hash as aid. 6) There is always possible solution 0 (photos of the opposite banks). Edited by author 19.08.2008 18:15 |
|
|