#P1003. Stay On The Spot

    ID: 31 传统题 3000ms 256MiB 尝试: 18 已通过: 4 难度: 9 上传者: 标签>福建师范大学第十八届程序设计竞赛正式赛

Stay On The Spot

说明

There is an array of length $n$, with a pointer at index $1$ at the beginning.

In each operation, you can move the pointer one step to the left or right, or stop in place (the pointer cannot be moved outside the array range).

You are given two integer $n,k$, please calculate the number of performances that after exactly $k$ operations are performed, the pointer still points to $1$.

Since the answer may be very large, please print the answer modulo $10^9 + 7$.

输入格式

The only line contains two integers $n,k$ $(2 \leq k < n \leq 10^4)$.

输出格式

Print the answer modulo $10^9+7$.

样例

2 4
8

样例

2 3
4

提示

In the second sample, you can move like these four methods : 1$\rightarrow$1$\rightarrow$1$\rightarrow$1, 1$\rightarrow$1$\rightarrow$2$\rightarrow$1,  1$\rightarrow$2$\rightarrow$1$\rightarrow$1, 1$\rightarrow$2$\rightarrow$2$\rightarrow$1.