|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияWe can write some FOCs which describe optimal point. But how to find point which satisfies these FOCs? I suspect it is not necessary to find this point, you can get correct answer without knowing exact location of it. I haven't solved this problem yet, so it is a hypotesis only... Haven't ACed yet, but it seems I found the algo which uses 2 binary searches only. If you want to use BS, you should have a sorted structure. What is it? Do you serach this point on some fixed line? Of course, I convert initial problem to some other problem, and there it is ordered structures =) Convex structure also gives O(lg n). For example golden proportion search om segment. |
|
|