Cojs crazy painter Crazy Fibonacci report

Source: Internet
Author: User

The Crazy Fibonacci

After learning something strange and then out of the question

The outermost mode p is obvious, but the inner layer does not have the modulus p

So, what's the model, apparently the cyclic section of the Fibonacci

Then we can get a layer of Fibonacci loops on each layer.

Then it can be calculated from the inward external use matrix multiplication.

For the minimum cycle section of Fibonacci, see the section on this blog's fib-seeking cycle.

Of course, this problem can only ask for a circular section, do not seek the minimum cycle section, it will be good to write more

(But I'm not going to tell you that the end will explode long long)

Crazy painter.

We set up a total of K unicom points in the tree.

There is an F (i) set of the link points containing point I

So the answer is obviously Sigma (f (i)/k)

First, we think about how to ask for K, for the set of interconnected points on any tree

There must be only one point with the smallest depth

Set g (i) to indicate that I is the minimum number of points in the depth of the Unicom block

If J is a child of I, then G (i) is obviously a product of G (j) +1

So K=sigma (g (i))

After that we consider F (i), the set of the Unicom points where any one of the points

There are only two cases of this point:

1, is the smallest point of depth

2, not the smallest point in depth

If 2 is present, his father must be in this unicom block

The father of I is J.

We can get F (i) =g (i) + g (i) * (f (j)/(g (i) +1))

Then the statistical answer can be

Cojs crazy painter Crazy Fibonacci report

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.