#1097. Brackets

    ID: 1097 传统题 1000ms 128MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>竞赛洛谷动态规划卡塔兰数数论组合数学

Brackets

Brackets

题目描述

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