let beauty array b_1 b_2 ldots b_n n 1 minlimits_1 leq j leq n b_i b_jYoure give array a_1 a_2 ldot a_n number k Calculate sum beauty subsequence array length exactly k as number large output modulo 998244353A sequence subsequence array b obtain b deletion possibly zero element