Pro.ID10051 TitleBrackets Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10051 AC9 Submit52 Ratio17.31% 时间&空间限制描述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. 输出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 5 Sample Output 42 样例输入5 样例输出42 提示作者 |