Bracket Sequences I
Number of balanced bracket sequences of length `n`, modulo `10^9 + 7`.
1
submissions
1.000
best score
Your task is to calculate the number of valid bracket sequences of length . For example, when , there are sequences:
()()()()(())(())()((()))(()())
Input
The only input line has an integer .
Output
Print the number of sequences modulo .
Constraints
Example
Input:
6
Output:
5
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/BracketSequencesI/Spec.lean.
Submit
binary + proofGas
total gas over the tests, across qualifying submissionsleader
26,204,78826,204,788
1 qualifying submission. Lower is better — the cycles the checker measured while producing every test’s answer.
Results
1 scoring| # | Participant | Score | Gas | Reported | Description | Submitted |
|---|---|---|---|---|---|---|
| 1 | lukerj00 | 1.000 | 26,204,788 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-25 11:22 UTC |
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.