Growing mushrooms - MarisaOJ: Marisa Online Judge

Growing mushrooms

Time limit: 1000 ms
Memory limit: 256 MB
Marisa has $n$ adjacent plots of land, and she plans to plant $m$ mushrooms. As the mushrooms grow, they will be very large, so she won't plant two mushrooms next to each other. How many ways are there to plant the mushrooms? Two planting arrangements are considered different if, in one arrangement, a mushroom is planted in a plot, while in the other arrangement, no mushroom is planted in that plot. ### Input - A single line containing two integers $n, m$. ### Output - Print the number of ways to plant the mushrooms satisfying the condition, modulo $10^9+7$. ### Constraints - $1 \le n \le 10^5$. - $1 \le m \le \lfloor \frac{n}{2} \rfloor$. ### Example Input: ``` 4 2 ``` Output: ``` 3 ```