Problem Descriptioneddy is a acmer, he not only like to do ACM problem, but also for each of the ranklist of the number of AC has a certain research, he is bored often on the paper on the ranklist of each person's AC number excerpt down, Then choose some people (or all) to compare the number of AC into two groups, he wants to make the minimum AC number in the first group is greater than the maximum AC number in the second group, but there will be a lot of, smart you know how many kinds of cases?
Special note: For the sake of simplification, we assume that the number of extracts under the excerpt is N, and that the number of AC for each person is not equal and the final result is within a 64-bit integer range.
Input inputs contain multiple sets of data, each containing an integer n representing the total number of people extracted from the ranklist.
Output for each instance, outputs the total number of scenarios that meet the requirements, one row per output.
Sample Input24
Sample Output117
The idea of recursion is still not very
I feel like I'm not going to write a blog every time I say it's not going to go down.
This problem is ana=1c (n,2) +2c (n,3) +3c (n,4) +...+ (n-1) C (n,n);
Another ans= (n-2) *pow (2,n-1) +1; (This is the idea of recursion)
Eddy ' s AC puzzle--hdu2200 (Recursive)