140804summer training .txt
1. Primary Functions
The mother function, as the name implies, is the mother. It indicates that there is a son in this function, that is, a subfunction. To put it bluntly, a subfunction can be considered as a subset of the primary function.
How can we use a primary function to represent these subfunctions? This is the so-called generic formula.
Generally speaking, the primary function is a set of coefficients before a polynomial, And the subfunction is the coefficients before each polynomial.
The primary functions have common and exponential functions. Most of the questions we usually encounter are common and less exponential, which is mainly used to solve the problem of multiple permutation.
Common types can be used in Question Types for solving combinations and integer splitting.
For example, if there are n kinds of items, if there are ki items in item I, We can multiply n items in the column (x ^ 0 + x ^ 1 +... x ^ k1) * (x ^ 0 + x ^ 1 +... x ^ k2 )*... * (x ^ 0 + x ^ 1 +... x ^ kn), each item indicates that for the I-th item, there can be (x ^ 0 + x ^ 1 +... x ^ ki), [Note that the coefficient is 1, because the same item is removed from the I, the method is 1] multiply multiple: because the fact that m items are taken is divided into n items, each of which is taken once ~ Ki count is the multiplication principle of combined counting. The coefficient of x ^ m is the number of all solutions combined into m items.
The main function framework is basically the same,
For example, hdu1028,
For (I = 2; I <= n; I ++)
{
For (j = 0; j <= n; j ++)
For (k = 0; k + j <= n; k + = I) // key
B [k + j] + = a [j];
For (j = 0; j <= n; j ++)
{
A [j] = B [j];
B [j] = 0;
}
}
Note: Based on the meaning of the question, carefully analyze and establish a relationship.