51nod 2583

Title

51st

practice

In the process of \ (gcd (x, y) \) , only the first occurrence of \ (x \ le y \) may be
assumed .

Consider a recursive tree whose nodes are two-tuples \ ((a, b) (a> b, a \ le m) \) . \ ((a, b) \ longrightarrow (a ', b') \) then \ ((a ', b') \) is the father point of \ ((a, b) \) \ ((a, b ) \) 'S subtree:



Then you can pass the subtree of \ ((a, b) \) through the following two operations:

\((a,b)\longrightarrow (a+b,b)\)\((a,b)\longrightarrow (a,a+b)\)

Use the \\ ((p, q) \) to describe a number \ (px + q (x + y) \) , because \ ((x, y) \) cannot go to the right. To facilitate calculation, first Going down one step \ ((x, x + y) \) , you can use \ (((1,0), (0,1)) \) to describe the
following two operations:

\(((a,b),(c,d))\longrightarrow ((a+c,b+d),(b,d))\)
\(((a,b),(c,d))\longrightarrow ((a,b),(a+c,b+d))\)

Two adjacent points on each line of Sbtree correspond to a \ (((a, b), (c, d)) \)

Then a point corresponding to the tree of the two contributions
so calculated, \ (2 \ Times \ SUM \ limits_ {I, J} [\ GCD (I, J) =. 1] [XI + (X + Y) J \ Le m] \)

Guess you like

Origin www.cnblogs.com/Grice/p/12720048.html
Recommended