Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор innoshark, история, 5 лет назад, По-английски

Hello, I was just attempting this questionhere and solved it by writing out this code here. However, my original thoughts on this question, were to write out a normal dp and then optimize it using matrix exponentiation, and then do binary search on all values of n. However, I got confused and I did not know how to do the optimization. Can someone please explain to me how this could be done?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится