题解:2017-2018 ACM-ICPC Southeastern European Regional Programming Contest (SEERC 2017)
Concerts辣鸡数据范围。滚动DP。#includeusingnamespacestd;constintN=1e7+9,M=1e9+7;chara[N],b[N];intn,k,f[2][N],h[127];intmain(){scanf("%d%d",&k,&n);for(charc='A';c=0)f[nxt][j]+=f[nxt^1][j-1-h[a[i-1]]];if(f[nxt][j