返回小组 开始 2026-03-07 13:00:00

3.7呈贡下午小测

结束 2026-03-07 15:00:00
Contest is over.
当前 2026-03-16 11:00:48

乒乓

include <bits/stdc++.h>

using namespace std;

int main() {

char a[100000];
int i=0,x=0,y=0;
while(1)
{
	cin>>a[i];
	if(a[i]=='E')
	{
		break;	
	}	
	i++;
} 
for(int j=0;j<i;j++)
{
	if(a[j]=='W')
	{
		x++;
	}
	if(a[j]=='L')
	{
		y++;
	}
	if((x>=11||y>=11)&&abs(x-y)>=2)
	{
		printf("%d:%d\n",x,y);
		x=0;
		y=0;
	}
}
printf("%d:%d\n",x,y);
x=0;
y=0;
cout<<endl;
	for(int j=0;j<i;j++)
{
	if(a[j]=='W')
	{
		x++;
	}
	if(a[j]=='L')
	{
		y++;
	}
	if((x>=21||y>=21)&&abs(x-y)>=2)
	{
		printf("%d:%d\n",x,y);
		x=0;
		y=0;
	}
}
printf("%d:%d\n",x,y);
x=0;
y=0;

return 0; }


YIYI  •  8天前

比赛已结束。