12572: Brackets
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:2
Solved:0
Description
This year MK is 5 years old. So he decides to learn some arithmetic. But he was confused by how to write the brackets. He has already known that the brackets should match when writing them correctly. Such as “()(())” is correct but “())(” is not.
The problem is that, if there are N pairs of brackets, how many ways that MK can write them correctly?
Input
There are several test cases. Each case contains a number N (1 <= N <= 1000) indicating the pairs of brackets.
Output
For each case, please output the answer mod 1,000,000,007.
Sample Input Copy
5
7
Sample Output Copy
42
429