TYC100132 @ 2024-12-11 14:01:20
#include<bits/stdc++.h>
using namespace std;
char s[2500*25+10];
long long a,b,q;
int main(){
while(cin>>s[++q],s[q]!='E'){
if(s[q]=='W') a++;
if(s[q]=='L') b++;
if((b>10||a>10)&&abs(b-a)>1)
cout<<a<<":"<<b<<endl,a=b=0;
}
if(a||b) cout<<a<<":"<<b<<endl;
cout<<endl,a=b=0;
for(int i=1;i<=q;i++){
if(s[i]=='W') a++;
if(s[i]=='L') b++;
if((b>20||a>20)&&abs(b-a)>1)
cout<<a<<":"<<b<<endl,a=b=0;
}
if(a||b) cout<<a<<":"<<b;
return 0;
}
by TYC100132 @ 2024-12-11 14:01:53
是80分