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

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

https://codeforces.net/contest/292 Hello, I was just attempting to do a question from the contest and then I was shocked to discover that this contest only has a russian editorial. Can someone please provide an english editorial, especially for question E which seems to be a very nice question and I would really like to learn how to do it? I have thought of solving it with segment trees, but haven't succeeded in writing out the code. I have researched everywhere on the internet for it but couldn't find nor the editorial, nor any mention for question E. Thanking you in advance

Полный текст и комментарии »

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

Автор 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
  • Проголосовать: не нравится