#P4091. [HEOI2016/TJOI2016] 求和
[HEOI2016/TJOI2016] 求和
Description
In 2016, Sister Jiayuan had just learned about the Stirling numbers of the second kind and was very happy.
Now she wants to compute the value of the following function:
$$f(n)=\sum_{i=0}^n\sum_{j=0}^i S(i,j)\times 2^j \times (j!)$$denotes the Stirling numbers of the second kind, with the recurrence: $S(i, j) = j \times S(i - 1, j) + S(i - 1, j - 1), 1 \le j \le i - 1$.
Boundary conditions: , .
Can you help her?
Input Format
The input contains a single positive integer .
Output Format
Output . Since the result can be large, output modulo 998244353 ().
3
87
Hint
For 50% of the testdata, . For 100% of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号