Problem F. Wireless Password
时间限制 1000 ms
内存限制 32 MB
Liyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liyuan did not know the password of the network, but he got some important information from his neighbor. He knew the password consists only of lowercase letters 'a'-'z', and he knew the length of the password. Furthermore, he got a magic word set, and his neighbor told him that the password included at least k words of the magic word set (the k words in the password possibly overlapping).
For instance, say that you know that the password is 3 characters long, and the magic word set includes 'she' and 'he'. Then the possible password is only 'she'.
Liyuan wants to know whether the information is enough to reduce the number of possible passwords. To answer this, please help him write a program that determines the number of possible passwords.
输入数据
输出数据
For each test case, please output the number of possible passwords MOD 20090717.
样例输入
复制
10 2 2
hello
world
4 1 1
icpc
10 0 0
0 0 0
样例输出
$ Mathjax font initiator $