#include #include #include #include using namespace std; int main(){ int Kr,Kb; string S; cin>>Kr>>Kb; cin>>S; vector v1; for(int i=0;i bs1(i); string S2=S; int a=0; for(int j=0;j<20;++j){ if(!bs1.test(j)){ S2.erase(v1[j]-a,1); a+=1; } } bool check=true; for(int j=0;j=0 && S2[j-Kr]=='R'){ check=false;break; } if(S2[j]=='B' && j+Kb=0 && S2[j-Kb]=='B'){ check=false;break; } } if(check && ans