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 1 - Reverse to : Step 2 - Reverse to : Step 3 - Reverse to : Step 4 - Reverse to :
Also, and . Find giving your answer modulo .
、 是两个正整数。
是第 个斐波那契数,其中 ,且对于正整数 ,。再记 、。
我们给定一个正整数数组 。初始时每个 均等于 。 现在我们接连对数组 进行 次操作。对于第 次操作,你需要将 中的 这段区间翻转。
然后,记 为经过 次操作后, 的值。
例如 ,计算它的过程如下:
故 。
亦已知 且 。 求 模 之值。
点 这个链接 回到源站。
点 这个链接 回到详细版题目目录。