1043 - Counting spanning tree
Time Limit : 1 Second
Memory Limit : 64 MB
- There are n distinct points on a line, only neighboring points have an edge between them. There are also two points outside the line, both of the two points have an edge with every point on the line, but there is no edge between the two points.
You are asked to count the number of the spanning trees among the N + 2 points.
- There are multi test cases.
Each case contains a line with an integer n, 1 <= n <= 100000000.
- For each test case, output one line containing the result. As the result may be very large, please mudule it with 1000000007.
- sample input
- sample output
- Du Peng