Older players rehabilitation

School quiz finished. Although as a class d salted players still have to prepare a good look at the noi.

Starting today rehabilitation training, but during the day it should be liver or cultural studies. So a few days should be a little more training time.

[CTS2019] Random cube

This question is now done it again seems a little sibo ah, it may be too nervous when the examination of the bar.

Meaning of the questions do not write.

Questions asked exactly \ (k \) a, we consider that at least containing \ (i \) th were inclusion and exclusion.

So the inclusion-exclusion factor \ (f_i \) need to be met:

\[[i=k]=\sum_{j=0}^i{i\choose j}f_j\]

Binomial inversion carried out to obtain:

\[f_i=\sum_{j=0}^i(-1)^{i-j}{i\choose j}[j=k]\]

which is:

\[f_i=(-1)^{i-k}{i\choose k}\]

Since the \ (i <k \) when \ ({i \ choose k} \) is equal to \ (0 \) , so the above equation is well-defined.

So consider how to calculate containing at least (i \) \ probability of a great number.

First, a great number of line number, column number, bule number (bule represents the third dimension name) is definitely not the same.

More crucial point is that we can notice any hand-picked \ (i \) pairwise different coordinate the whole grid is a great probability that the number is the same. So we can find a special location count, such as making their coordinates \ ((1,1,1) \) , \ ((2,2,2) \) , \ (\ DOTS \) , \ ( (i, i, i) \) . We picked \ (A_ {1,1,1} <A_ {2.2.2} <\ DOTS <A_ {I, I, I} \) .

Think about that can be found only if we observe at least one-dimensional horizontal axis \ (\ leq i \) grid, \ ((i, i, i) \) must be one of the maximum. If we observe only have at least one dimension abscissa \ (\ leq i-1 \ ) lattice, \ ((. 1-I, I-. 1,. 1-I) \) must be the maximum value thereof. And so on can be. Not difficult to find as long as the above conditions are met, then the program must legally.

We set \ (a_i \) indicates that all the horizontal axis has at least one dimension \ (\ leq i \) of the number of lattice. Before then the probability of satisfying the condition that:

\[\prod_{j=1}^i\frac{1}{a_j}\]

Also note that this is just the answer after we hand-picked the location and size of the relationship, all legal relations program to select the location and size of a total of \ ({n \ choose i} {m \ choose i} {l \ choose i} * (i!) ^ 3 \ ) kinds of combinations of three-dimensional meaning is elected, horizontal, vertical, Bule coordinates, and then determines the size relationship.

Number scheme may be used behind the pre-factorial and inverse ELEMENT \ (O (1) \) calculated before the probability, can find the inverse element shared equally by linear \ (O (1) \) is calculated. Thus a group of data is done \ (O (n) \) , the overall complexity \ (O (Tn of) \) .

Guess you like

Origin www.cnblogs.com/Mr-Spade/p/11115654.html