Problems Description
<div class="Section0"> <p class="p0" style="text-indent:24.0000pt;"> <span style="line-height:1.5;">This year MK is </span><span style="line-height:1.5;">5 years old. So he decides to learn some </span><a href="app:ds:arithmetic">arithmetic</a><span style="line-height:1.5;">. 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.</span> </p> <p class="p0" style="text-indent:24.0000pt;"> The problem is that, if there are N pairs of brackets, how many ways that MK can write them correctly? </p> <p class="p0"> <br /> </p> </div>
Input格式
<span> There are several test cases. Each case contains a number N (1 <= N <= 1000) indicating the pairs of brackets.</span>
Output格式
<span>For each case, please output the answer mod 1,000,000,007.</span>
Sample
Sample Input 1
5
7
Sample Output 1
42
429
Submit Code
请先Login后Submit
🤖 AI 解题助手
OpenRouter
就绪