Classic
Clean & simple
Crystal
Glassmorphism + Neon
Cyberpunk
Neon glitch art
🚫
违规Action检测
禁止Use右键菜单
⚠️ 此Action已被系统记录
1

Brackets

📝 Solutions 🔵 仅限 C++
Problems Description
<div class="Section0"> <p class="p0" style="text-indent:24.0000pt;"> <span style="line-height:1.5;">This&nbsp;year&nbsp;MK&nbsp;is&nbsp;</span><span style="line-height:1.5;">5&nbsp;years&nbsp;old.&nbsp;So&nbsp;he&nbsp;decides&nbsp;to&nbsp;learn&nbsp;some&nbsp;</span><a href="app:ds:arithmetic">arithmetic</a><span style="line-height:1.5;">.&nbsp;But&nbsp;he&nbsp;was&nbsp;confused&nbsp;by&nbsp;how&nbsp;to&nbsp;write&nbsp;the&nbsp;brackets.&nbsp;He&nbsp;has&nbsp;already&nbsp;known&nbsp;that&nbsp;the&nbsp;brackets&nbsp;should&nbsp;match&nbsp;when&nbsp;writing&nbsp;them&nbsp;correctly.&nbsp;Such&nbsp;as&nbsp;“()(())”&nbsp;is&nbsp;correct&nbsp;but&nbsp;“())(”&nbsp;is&nbsp;not.</span> </p> <p class="p0" style="text-indent:24.0000pt;"> The&nbsp;problem&nbsp;is&nbsp;that,&nbsp;if&nbsp;there&nbsp;are&nbsp;N&nbsp;pairs&nbsp;of&nbsp;brackets,&nbsp;how&nbsp;many&nbsp;ways&nbsp;that&nbsp;MK&nbsp;can&nbsp;write&nbsp;them&nbsp;correctly? &nbsp; </p> <p class="p0"> <br /> </p> </div>
Input格式
<span>&nbsp;There&nbsp;are&nbsp;several&nbsp;test&nbsp;cases.&nbsp;Each&nbsp;case&nbsp;contains&nbsp;a&nbsp;number&nbsp;N&nbsp;(1&nbsp;&lt;=&nbsp;N&nbsp;&lt;=&nbsp;1000)&nbsp;indicating&nbsp;the&nbsp;pairs&nbsp;of&nbsp;brackets.</span>
Output格式
<span>For&nbsp;each&nbsp;case,&nbsp;please&nbsp;output&nbsp;the&nbsp;answer&nbsp;mod&nbsp;1,000,000,007.</span>
Sample
Sample Input 1
5 7
Sample Output 1
42 429
Submit Code
请先Login后Submit

🤖 AI 解题助手

OpenRouter
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这problems题,可以帮你points析思路、提供Code示例。
🔓 完全Free · 无需消耗 Token