1 3 2
1 Only the following one amidakuji satisfies the condition: 
1 3 1
2 Only the following two amidakuji satisfy the condition: 
2 3 3
1 Only the following one amidakuji satisfies the condition: 
2 3 1
5 Only the following five amidakuji satisfy the condition: 
7 1 1
1 As there is only one vertical line, we cannot draw any horizontal lines. Thus, there is only one amidakuji that satisfies the condition: the amidakuji with no horizontal lines.
15 8 5
437760187 Be sure to print the answer modulo $1\ 000\ 000\ 007$.
{
"problem": {
"name": "Number of Amidakuji",
"description": {
"content": "Amidakuji is a traditional method of lottery in Japan. To make an amidakuji, we first draw $W$ parallel vertical lines, and then draw horizontal lines that connect them. The length of each vertical li",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc113_d"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Amidakuji is a traditional method of lottery in Japan.\nTo make an amidakuji, we first draw $W$ parallel vertical lines, and then draw horizontal lines that connect them. The length of each vertical li...",
"is_translate": false,
"language": "English"
}
]
}