|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияДайте, пожалуйста, подсказку... Oh, no! It is not interesting to solve this problem with binary search. Here is a formula. You have to find it yourself :) But it's not so difficult to find it. Just replace a1 with a0 and a2, then a2 with a1 and a3,... After four or five such replaces you will see dependence. Edited by author 04.07.2012 11:30 Deriving formula for calculation of a1 makes it simple. |
|
|