本地运行测试点输出全对,怎么提交就全WA?
没有语法和基本错误啊,样例能过,为什么会WA?
难道刚才评测姬炸了之后出问题了?
#include<iostream>
#include<cmath>
using namespace std;
char tmp;
int hsf[2]={11,21};
int a[25*2500+18],n=0;
int main(){
while(1){
cin>>tmp;
if(tmp=='E') break;
if(tmp=='W') a[n]=1;
if(tmp=='L') a[n]=0;
n++;
}
int W,L;
for(int k=0;k<2;k++){
if(k==1) cout<<endl;
for(int i=0;i<n;i++){
W+=a[i];
L+=1-a[i];
if(max(W,L)>=hsf[k]&&abs(W-1)>=2){
cout<<W<<":"<<L<<endl;
W=0;
L=0;
}
}
cout<<W<<":"<<L;
cout<<endl;
}
return 0;
}