2 4 1 10 3 6 8 1 2 3 4 5 6 7 8
There is no good subsequence.
0 16
A sequence b1,b2,…,bkb_1, b_2, \ldots, b_kb1,b2,…,bk is called good if and only if:
You are given an array aaa of length nnn.
Among all 2n2^n2n subsequences of array aaa, compute the number of good subsequences modulo 998244353998244353998244353.
One of the good subsequences is 3,4,73,4,73,4,7 because 7=4+37 = 4+37=4+3.