{"problem":{"name":"Solitaire","description":{"content":"Snuke has decided to play with $N$ cards and a deque (that is, a double-ended queue). Each card shows an integer from $1$ through $N$, and the deque is initially empty. Snuke will insert the cards at ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc068_d"},"statements":[{"statement_type":"Markdown","content":"Snuke has decided to play with $N$ cards and a deque (that is, a double-ended queue). Each card shows an integer from $1$ through $N$, and the deque is initially empty.\nSnuke will insert the cards at the beginning or the end of the deque one at a time, in order from $1$ to $N$. Then, he will perform the following action $N$ times: take out the card from the beginning or the end of the deque and eat it.\nAfterwards, we will construct an integer sequence by arranging the integers written on the eaten cards, in the order they are eaten. Among the sequences that can be obtained in this way, find the number of the sequences such that the $K$\\-th element is $1$. Print the answer modulo $10^{9} + 7$.\n\n## Constraints\n\n*   $1 ≦ K ≦ N ≦ 2{,}000$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc068_d","tags":[],"sample_group":[["2 1","1\n\nThere is one sequence satisfying the condition: $1,2$. One possible way to obtain this sequence is the following:\n\n*   Insert both cards, $1$ and $2$, at the end of the deque.\n*   Eat the card at the beginning of the deque twice."],["17 2","262144"],["2000 1000","674286644"]],"created_at":"2026-03-03 11:01:14"}}