Problem #333
Another Banger
You have been given n characters a_0, a_1, a_2, \ldots, a_n. They are arranged in their lexicographical value, i.e. a_0 < a_1 < a_2 < a_3 < \ldots < a_n. Now, you have to determine the number of all the strings of length n = 2702 such that for every character equal to a_k in the string , a_k+1,a_k+2,a_k+3.... , a_n must appear before it at least once.
Answer the value as modulo 1000000007 .
Note that it is not necessary to use all the characters in a string.