社区讨论
我好聪明,像**一样,食答辩了,0pts
P1042[NOIP 2003 普及组] 乒乓球参与者 2已保存回复 2
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 2 条
- 当前快照
- 1 份
- 快照标识符
- @lppico4z
- 此快照首次捕获于
- 2023/12/03 21:18 2 年前
- 此快照最后确认于
- 2023/12/04 12:36 2 年前
求助,满屏的Woderful Answer
我觉得我写的也没错啊
怎么就Woderful Answer了呢(首)
正确答案只有一个:我食答辩了,所以WA.
CPP#include<bits/stdc++.h>
using namespace std;
int main()
{
int h21=0,l21=0,h11=0,l11=0;
string s="";
cin>>s;
for(int i=0;i<=s.length()-1;i++){
if(s[i]=='E')break;
if(h11+l11==11){
cout<<h11<<':'<<l11<<endl;
h11=0;l11=0;
}
if(s[i]=='W')h11+=1;
if(s[i]=='L')l11+=1;
}
if(l11!=0||h11!=0){
cout<<h11<<':'<<l11<<endl;
}
cout<<endl;
for(int i=0;i<=s.length()-1;i++){
if(s[i]=='E')break;
if(h21+l21==21){
cout<<h21<<':'<<l21<<endl;
h21=0;l21=0;
}
if(s[i]=='W')h21+=1;
if(s[i]=='L')l21+=1;
}
if(h21!=0||l21!=0){
cout<<h21<<':'<<l21;
}
return 0;
}
呃啊呃啊呃啊呃啊呃啊呃啊,谁来救食大便的我啊,
全部Woderful Answer的也就只有窝一个人了罢
回复
共 2 条回复,欢迎继续交流。
正在加载回复...