Yarra Gnisrever
Let and be two positive integers.
is the -th Fibonacci number: , for all .
Let and let .
Start with an array of integers where initially every is equal to . Now perform successive operations on , where the -th operation consists of reversing the order of those elements in with indices between and (both ends inclusive).
Define to be after operations.
For example, , as can be seen from the following procedure:
Initial position:
Step - Reverse to :
Step - Reverse to :
Step - Reverse to :
Step - Reverse to :
Also, and .
Find giving your answer modulo .
组数转逆
任取两个正整数和。
是第个斐波那契数:,对于所有,。
令,。
在初始状态下,整数数组中,等于。现在,对进行连续的次逆转操作,其中第次操作将数组中下标在和之间(包含两端)的元素逆序排列。
完成次操作后,记为。
例如,,其操作和计算过程如下所示:
初始状态:
第步 - 将至逆转:
第步 - 将至逆转:
第步 - 将至逆转:
第步 - 将至逆转:
已知,,。
求并将你的答案对取余。
Gitalking ...