question : partition expectation For an array of Length n, a function is defined as F(A) = Number of partitions of array A such that each consecutive segment in the partition has a sum in [L,R]. You need to find the expected value of F(A) i.e. (E(F[A])) over all arrays of length n having each element in the range [1,K]. here partition means a division of an array into consecutive segments such that each element belongs to exactly one segment. Print the expected value for all n in the range [1,N] module 998244353. you are given four Integers N,K,L,R 1<=N<=1e5 1<=K<=1e6 1<=L<=R<=K ex 1. input 2 2 1 2 output 1 748683266 for 1 length [1] = 1 way [2] = 1 way expected value (1+1)/2=1 for 2 length [1,1]= two way ([1],[1]) , ([1,1]) [1,2]= one way ([1],[2]) [2,1]= one way ([2],[1]) [2,2]= one way ([2],[2]) expected value 5/4