char s[1d5+1]; ll n; Mint f(char const*t){ int h[256]{0}; rep(i,9){ h[t[i]]=i+1; } Mint e[10]; e[0]=1; rep(i,n){ ll x=h[s[i]]; if(x){ e[x]+=e[x-1]; } } return e[9]; } { rd(n,s); Mint z; z+=f("yukicoder"); z+=f("?ukicoder"); z+=f("y?kicoder"); z+=f("yu?icoder"); z+=f("yuk?coder"); z+=f("yuki?oder"); z+=f("yukic?der"); z+=f("yukico?er"); z+=f("yukicod?r"); z+=f("yukicode?"); wt(z); }