Problem 803
Pseudorandom sequence
Rand48 is a pseudorandom number generator used by some programming languages. It generates a sequence from any given integer
Let
For example, if we choose
Moreover, starting from index
Alternatively, if
Now suppose that the string
Find the starting index of the first occurrence of the substring “LuckyText” in
伪随机序列
许多编程语言都使用Rand48这种伪随机数生成器。对于任意给定整数
记
例如,如果我们选择
进一步地,在字符串下标为
另一方面,如果我们希望字符串
现在假设字符串
求我们第一次在字符串
Gitalking ...