10051_Brackets

2022-5-16 18:16| 发布者: Hocassian| 查看: 78| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504492424899-Problem List-采集的数据-后羿采集器.html

Pro.ID

10051

Title

Brackets

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=10051

AC

9

Submit

52

Ratio

17.31%

时间&空间限制

  • Time Limit: 400/200 MS (Java/Others)     Memory Limit: 65536/32768 K (Java/Others)
  • 描述

    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
    7

    Sample Output

    42
    429

    样例输入

    5
    7

    样例输出

    42
    429

    提示

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部