A dart board is divided into m regions. Region i is worth a_i points; several regions may be worth the same number of points, but they are still different regions. A player throws n darts, and every dart hits exactly one region.
Count the number of distinct throw sequences whose points add up to exactly the target T. Throws are ordered: hitting region 1 then region 2 is a different sequence from hitting region 2 then region 1 — and hitting two different regions of equal value also gives different sequences.
Since the count can be enormous, output it modulo 998244353.
The first line contains n, m and T. The second line contains the m region values a_1 ... a_m.
One integer: the number of sequences, modulo 998244353. If the target is unreachable, output 0.
1 <= n <= 200
1 <= m <= 100
1 <= a_i <= 50
0 <= T <= 10000
This is a standard problem: a submission scores full points if it produces the correct output for every test case, and zero otherwise.
2 3 4 1 2 3
3
3 2 100 5 7
0