[Bzoj2839] explanations set count (the number of combinations repellent + Tol)

Description

A set of N elements there are 2 ^ N different subsets (containing empty set), now taken into sets (at least one) in this 2 ^ N sets such that
Their intersection is the number of elements is K, the number obtaining process program, the answer mode 1000000007. (Oh ~ is a prime number)

Input

Line two integers N, K

Output

A behavioral answer.

Sample Input

3 2

Sample Output

6

HINT

[DESCRIPTION] Sample

assumption that the original set of {A, B, C}

of the program satisfies the condition of: {AB, ABC}, { AC, ABC}, {BC, ABC}, {AB}, {AC}, { BC}

[data description]

     to 100% of the data, 1≤N≤1000000; 0≤K≤N;

 

 

First, take the number k to 1 ~ n When the intersection, the number of programs apparently $ C_n ^ k $

 

Guess you like

Origin www.cnblogs.com/Rorschach-XR/p/11131690.html