Drunkards

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

He is a positive man in every way, except that he goes to the bar every evening...

One of your friends is a bartender in the city's most famous (and only) bar. There are 2n+12 \cdot n + 1 houses in the city, located along one long road and numbered from 00 to 2n2 \cdot n. The bar is located in the house numbered nn.

The interesting fact is that all drunkards in the city have the same habit. Of course, they leave the bar having a condition not allowing them to go along a way home, so they start to walk without a goal. Namely, every drunkard has an array aa in mind, which has length nn. In the ii-th second after leaving the bar, the drunkard wants to change his position in the road by a_ia\_i (a_i=1|a\_i| = 1). If the drunkard was in front of the house jj, he would be in front of the house j+a_ij + a\_i after this change.

However, they are so drunk that each second with probability p100\frac{p}{100} they are not capable of moving and stay in their current position.

If a drunkard arrives in front of his house, his family members see him and take him home. Possibly, if he lives in the nn-th house itself, his family members will take him immediately.  However, after nn seconds, if not taken, a drunkard becomes disappointed and sleeps in the street.

Another drunkard came to the bar. The bartender does not know where he lives, so he just assumes for every house the probability is 12n+1\frac{1}{2 \cdot n + 1} that the drunkard lives there. Calculate the probability that his family members will take him home modulo 998,244,353998\\,244\\,353.

입력

The first line contains two integers nn and pp (1n50001 \leq n \leq 5000, 0p1000 \leq p \leq 100), which are described in the statement.

The second line contains nn integers a_1,,a_na\_1, \ldots, a\_n (a_i=1|a\_i| = 1) --- the drunkard's intentions in the ii-th second.

출력

Output one integer --- the answer modulo 998,244,353998\\,244\\,353.

Formally, let M=998,244,353M = 998\\,244\\,353. It can be shown that the answer can be expressed as an irreducible fraction pq\frac{p}{q}, where pp and qq are integers and it is guaranteed that qq is not divisible by MM. Output the integer equal to pq1modMp \cdot q^{-1} \bmod M. In other words, output such an integer xx that 0x<M0 \leq x < M and xq=p(modM)x \cdot q = p \pmod{M}.