#10 why WA and how to xiu it,please
查看原帖
#10 why WA and how to xiu it,please
1210103
Program_A2楼主2025/1/29 09:28
#define I return
#define AK 0
#define IOI ;
#include "bits/stdc++.h"
using namespace std;
char a[62526];
int main(){
	int i=1,x=0,y=0,kk,kkk;
	bool n=0,b=0;
	while(true){
		scanf("%c",&a[i]);	
		if(a[i]=='E')break;
		i++;
	}
	i-=1;
	for(int l=1;l<=i;l++){
		if(a[l]=='W')x++;	
		if(a[l]=='L')y++;
		if((x>=11||y>=11)&&abs(x-y)>=2){
			printf("%d:%d\n",x,y);
			kk=x;
			kkk=y;
			n=1;
		    x=0;
			y=0;
		}
	}
	if(x!=0||y!=0){
		printf("%d:%d\n",x,y);
		n=1;
	}
	if(n==0)cout<<"0:0\n";
	cout<<'\n';
	x=0;
	y=0;
	for(int l=1;l<=i;l++){
		if(a[l]=='W')x++;
		if(a[l]=='L')y++;
		if((x>=21||y>=21)&&abs(x-y)>=2){
			printf("%d:%d\n",x,y);
			b=1;
			x=0;
			y=0;
		}
	}
	if(x!=0||y!=0){
		printf("%d:%d",x,y);
		b=1;	
	}
	if(b==0)cout<<"0:0";
    I AK IOI
}
/* 
 ______      ______  __  __      ______   _____   ______     
/\__  _\    /\  _  \/\ \/\ \    /\__  _\ /\  __`\/\__  _\    
\/_/\ \/    \ \ \L\ \ \ \/'/'   \/_/\ \/ \ \ \/\ \/_/\ \/    
   \ \ \     \ \  __ \ \ , <       \ \ \  \ \ \ \ \ \ \ \    
    \_\ \__   \ \ \/\ \ \ \\`\      \_\ \__\ \ \_\ \ \_\ \__ 
    /\_____\   \ \_\ \_\ \_\ \_\    /\_____\\ \_____\/\_____\
    \/_____/    \/_/\/_/\/_/\/_/    \/_____/ \/_____/\/_____/
*/
2025/1/29 09:28
加载中...