6258: Brackets
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:2
解决:2
题目描述
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?
输入
There are several test cases. Each case contains a number N (1 <= N <= 1000) indicating the pairs of brackets.
输出
For each case, please output the answer mod 1,000,000,007.
样例输入 复制
5
7
样例输出 复制
42
429