Mathematician QSC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description QSC dream of becoming a mathematician, he believes that everything in this world has a mathematical law. Through unremitting e…
Best Solver The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+26–√)1+2xy=(5+26)1+2x. For a given integer x (0≤x<232)x (0≤x<232) and a given prime number M (M≤46337)M (M≤46337),…
Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 187893 Accepted Submission(s): 46820 Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A…
A Short problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1110 Accepted Submission(s): 436 Problem Description According to a research, VIM users tend to have shorter fingers, compared…
题意:一个细胞自动机包含 n 个格子,每个格子取值是 0 ~ m-1,给定距离,则每次操作后每个格子的值将变成到它距离不超过 d 的所有格子在操作之前的值之和取模 m 后的值,其中 i 和 j 的距离为 min{|i-1|, n-|i-j|}.给定 n,m,d,k 和自动机每个格子的初始值,求 k 次操作后的各个格子的值. 析:由于能够直接能推出公式,而且 k 比较大,很容易想到是矩阵快速幂,并且也能够写出矩阵方程.假设 d = 1 很容易得到这个矩阵,然后使用矩阵快速幂,但是复杂度是 O(n…