P1042球大佬DEBUG
  • 板块灌水区
  • 楼主Program_A2
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/10/26 14:54
  • 上次更新2024/10/26 16:36:01
查看原帖
P1042球大佬DEBUG
1210103
Program_A2楼主2024/10/26 14:54

rt,传送门

#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;
	bool n=0,b=0;
	while(true){
		scanf("%c",&a[i]);	
		if(a[i]=='E')break;
		i++;
	}
	i--;
	for(int l=1;l<=i;l++){
		if(a[l]=='W')x++;	
		if(a[l]=='L')y++;
		if(x%11==0&x!=0||y%11==0&&y!=0){
			printf("%d:%d\n",x,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==0&&x!=0||y%21==0&&y!=0){
			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
}
2024/10/26 14:54
加载中...