#00021F

mit-indiv09-words

You are studying the cost of printing newspapers using different alphabets. For a given alphabet, you know the number of letters it contains, and the cost of printing each of the letters (in dollars). What is the number of different words that cost exactly M dollars? Since we don’t know anyting about the language, you should assume that any possible combination of the letters in the alphabet is a valid word.



InputThe first line of the input contains two integers N and M separated by a space character (1 <= N <= 26, 1 <= M <= 10^200). N is the number of letters in the alphabet, and M is your budget in dollars. Each of the next N lines contain one integer A(A <= N), representing the cost of writting the corresponding letter.


OutputIn the first line of the output, write a single number T mod 8192, where T is number of different words whose printing costs exactly M.


Input:
4 1
23
1
1
1

Output:
3

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.