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

Автор neverblunder, история, 4 года назад, По-английски

Hi, hope you all have a good day (or a good night, it's midnight in my area lol). Recently I came across a problem, which takes two integers — n and m — as input, with 3 <= n, m <= 10^9. The problem asks for the value of F(F(i)) mod m, with F(i) denoting the i-th Fibonacci number. I'm not sure if this question has been asked before on any platform (though I'm pretty sure no one has asked about it on English Competitive Programming Forums), but this seems to be a direct application of the Pisano Period. However, I am only able to find an O(m^2) algorithm, which does not suffice the condition of this problem. Even though there seems to be a fast enough algorithm on mathoverflow, the writer explicitly stated that this algorithm may fail with specific prime numbers. So, my question is does there exist a precise method of calculating the pisano period of large number >= 10^9 ? Thanks in advance for your responses, I will really appreciate your helps.

Update: The problem of precisely calculating the pisano period for every number is in fact unsolved, since the existence of numbers that potentially break the properties are not yet proved.

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

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

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

Hello people of Codeforces, I hope you are all doing well. I'm a high school student, and my biggest passion is Competitive Programming. I started Competitive Programming a few months ago, and so far I have quite improved, that now I can solve problems that I couldn't solve months ago. However, being a self-learner, I have many troubles improving my skills. One of these troubles, which is the most significant hindrance to me, is that my I have been unable to improve my thinking skill. When solving problems, I am still following my old path of thinking, and for harder problems, this path of thinking will not help me reach the solution, since these problems require creativity, but my way of thinking is too simple and quite trivial. I feel that I have been struggling to think differently, or think creatively, from when I started Competitive Programming, and most problems that I can solve usually have something in common with the ones I have known. So, to all people here, how have you been able to think differently, and invent solutions for new problems you have never seen ?. Furthermore, can anyone recommend me how can I practice to improve my thinking ability, or creativity. I know that the way to think about a problem matters the most to me, so I will really appreciate your help. Thank you all for reading this blog, and have a nice day.

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

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