plmnbvcxz4 @ 2024-12-16 15:28:17
using namespace std;
using ll=long long;
const int N=1e5+10;
char a[N];
void regulation(int mscore){
int x=0,y=0;
int i;
for( i=1;a[i]!='E';i++){
if(a[i]=='W')x++;
if(a[i]=='L')y++;
if(i%mscore==0){
cout<<x<<':'<<y<<'\n';
x=0;y=0;
}
}
if(x!=0||y!=0)
cout<<x<<':'<<y<<'\n';
}
int main(){
int i;
for(i=1;cin>>a[i]&&a[i]!='E';i++){
if(a[i]=='\n')
continue;
}
regulation(11);
cout<<'\n';
regulation(21);
return 0;
} ```