A. B
label:
Mobius inversion + Du teach sieve
answer:
See this problem surface is obviously not run Mobius
Provided $ f [i] $ $ GCD representative of exactly $ $ $ i is the number of programs
$ G [i] $ $ Representative GCD $ $ I $ is a multiple of the number of programs
which is
$$g[i]=\sum\limits_{i|d}f[d]$$
$$g[i]=C_{\lfloor \frac{n}{i} \rfloor +k-1}^{\lfloor \frac{n}{i} \rfloor -1}$$
Mobius inversion about
$$f[i]=\sum\limits_{i|d}\mu{\frac{d}{i}}*g[d]$$
$ \ Mu [i] $ DU can teach sieve demand
A large number of combinations of direct $ O (k) $ violence, pretreatment can be small
B. B Jun memories
label:
+ $ BSGS $ matrix multiplication cycle section to find
answer:
Think on the test matrix multiplication eating dates pills, we would like to push through key result of the formula forget to $ Fibonacci $ how to push the
Push for a morning now finally launch it
In fact, the difficulty lies generating function and Splitting
设$x=\sqrt(5),g[k]=\frac{1}{x}*((\frac{2}{3-x})^k-(\frac{2}{3+x})^k)$
$ K == 1 $ matrix multiplication can be directly
However, the growth rate of $ G $ array is very fast, so $ k> 1 $ situation requires each layer of a number modulo
Located in the lower mold $ p $ significance of circulating section is $ h $, then there
$$T^h\equiv I(mod\ p)$$
Set $ V = \ sqrt {p * 2 + 1} $, $ h = x * Vy $
So it can find $ BSGS $ $ h $ in the complexity of $ O (V) $ of
However, $ k <= 100 $ Therefore, complexity is still not good enough
In fact, circulation section function $ f (x) $ has magical properties:
$1>(a,b)=1\ f(ab)=lcm(f(a),f(b))$
$2>f(p^k)=f(p)*p^{k-1}$
C. sanrd
label:
$MTT$
answer:
Some ideas of solving the problem is very cool:
$ 1> $$ x ^ {2ij} = x ^ {(i + j) ^ 2-i ^ 2-j ^ 2} $, can contribute to the next convolution
$ 2> $ test point the idea of divide and conquer, sometimes it really is possible positive solutions
Since the formula too much, directly on the link brother of NC