zcx20242024 @ 2024-10-06 09:49:24
#include<bits/stdc++.h>
using namespace std;
char a[750000];
int b[750000][3],c[750000][3];
int main()
{
int n=1;
while(cin>>a[n]&&a[n]!='E') n++;
n--;
int n1=1,n2=1;
for(int i=1,j=1,k=1;i<=n;i++,j++,k++)
{
if(j==12) j=1,n1++;
if(k==22) k=1,n2++;
if(a[i]=='W') b[n1][1]++,c[n2][1]++;
if(a[i]=='L') b[n1][2]++,c[n2][2]++;
}
for(int i=1;i<=n1;i++)
{
printf("%d:%d\n",b[i][1],b[i][2]);
}
cout<<endl;
for(int i=1;i<=n2;i++)
{
if(i!=n2) printf("%d:%d\n",c[i][1],c[i][2]);
else printf("%d:%d",c[i][1],c[i][2]);
}
return 0;
}
p1024
by ikunTLE @ 2024-10-06 10:08:48
明显是 P1042