| 2015 ICL, Finals, Div. 1 |
|---|
| Finished |
The sequence of calculations in arithmetic expressions is usually set by a certain arrangement of parentheses. For example, $$$(3 \cdot (2+1)) \cdot (4-5)$$$. After deleting all the elements from the expression except parentheses remaining symbols form a parentheses sequence $$$(())()$$$. Let's assume that adding character «$$$0$$$» does not corrupt the sequence. Let's call such sequence a disperse parentheses sequence. Also this can be defined as follows:
The depth of disperse parentheses sequence is the maximum difference between the number of opening and closing parentheses in the sequence prefix. (The prefix of line $$$S$$$ is the line, which can be obtained from $$$S$$$ by deleting symbols from the tail of the line. For example, the prefixes of line «$$$ABCAB$$$» are lines «», «$$$A$$$», «$$$AB$$$», «$$$ABC$$$», «$$$ABCA$$$» and «$$$ABCAB$$$».) Thus, the depth of the sequence «$$$(0)(0())0$$$» equals two (prefix «$$$(0)(0($$$» contains three openinig and one closing parentheses).
Calculate the number of possible disperse parentheses sequences $$$n$$$ symbols long, that have a depth $$$k$$$.
Single line contains space-separated integers $$$n$$$ and $$$k$$$ ($$$1 \le n \le 300$$$, $$$0 \le k \le n$$$).
Output the number of possible disperse parentheses sequences $$$n$$$ symbols long, that have a depth $$$k$$$ modulo ($$$10^9+9$$$).
3 0
1
3 1
3
3 2
0
| Name |
|---|


