Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

Блог пользователя Mintoo

Автор Mintoo, 11 лет назад, По-английски
  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

The same problem was in ch24 qualifying round some years ago. There is another nice way to solve it using hill climbing optimization. You can start from the point (Xs = avg{Xi}, Ys = avg{Yi}) and then try to move in each of the 8 directions by some distance d = 1010 and see which point has the best result out of eight and then you repeat the move but with a smaller distnace d = d / 10. Once d reaches some convergence threshold, 1e - 9 for example, you can output the solution.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I will give it a shot using 2D ternary search, though it is often hard to prove correctness in similar solutions... It is nice to see gradient and hessian applied in some algos :).