#define MD 998244353 int @N, x = 0; char @S[N]; Comb comb; x += arrCountVal(N,S,@['A','B']); wt(comb.C(N,x));