乒乓球
#include<iostream>
#include<vector>
using namespace std;
int main()
{
char c;
vector<int> table;
while(cin>>c&&c!='E')
{
if(c=='W')
table.push_back(1);
if(c=='L')
table.push_back(2);
}
table.push_back(0);
int count1[2] = {0};
for(int i = 0;;i++)
{
if(table[i]==1)
count1[0]++;
else if(table[i]==2)
count1[1]++;
else if(table[i]==0)
{
cout<<count1[0]<<":"<<count1[1]<<endl;
break;
}
if(abs(count1[0]-count1[1])>=2)
{
if(count1[0]>=11||count1[1]>=11)
{
cout<<count1[0]<<":"<<count1[1]<<endl;
count1[0] = 0, count1[1] = 0;
}
}
}
count1[0] = 0, count1[1] = 0;
cout<<endl;
for(int i = 0;;i++)
{
if(table[i]==1)
count1[0]++;
else if(table[i]==2)
count1[1]++;
else if(table[i]==0)
{
cout<<count1[0]<<":"<<count1[1];
break;
}
if(abs(count1[0]-count1[1])>=2)
{
if(count1[0]>=21||count1[1]>=21)
{
cout<<count1[0]<<":"<<count1[1]<<endl;
count1[0] = 0, count1[1] = 0;
}
}
}
}