#include #include using namespace std; using s_t=vector; int kr, kb; int max_u(int& m, int v) { if(m0 && s[i]==s[i-1]) continue; s_t w; w=s; w.erase(w.begin()+i); solve(w, result); } } int main(void) { char cs[30+2]; s_t s; int result; while(scanf("%d%d%s", &kr, &kb, cs)==3) { s.clear(); for(int i=0;cs[i];i++) { s.push_back(cs[i]); } result=0; solve(s, result); printf("%d\n", result); } return 0; }