liangcha_crush_ly @ 2024-08-01 10:58:20
#include<iostream>
using namespace std;
char s;
int x[5700][2],y[5700][2],xs=1,ys=1;
signed main(){
for(int i=1;cin>>s&&s!='E';i++){
if(x[xs][0]+x[xs][1]==11)xs++;
if(y[ys][0]+y[ys][1]==21)ys++;
if(s=='W')x[xs][0]++,y[ys][0]++;
else x[xs][1]++,y[ys][1]++;
}if(x[xs][0]+x[xs][1]==11)x[++xs][0]=0,x[xs][1]=0;
if(y[ys][0]+y[ys][1]==21)y[++ys][0]=0,y[ys][1]=0;
for(int i=1;i<=xs;i++){
cout<<x[i][0]<<":"<<x[i][1]<<"\n";
}cout<<"\n";
for(int i=1;i<=ys;i++){
cout<<y[i][0]<<":"<<y[i][1]<<"\n";
}
return 0;
}
by _chicken_ @ 2024-08-01 11:10:31
这题要联系乒乓球的规则的
by _chicken_ @ 2024-08-01 11:13:30
要相差大于2才算赢
by liangcha_crush_ly @ 2024-08-01 11:22:42
@chicken 栓Q