历史上最简单的题目,数单词的个数。。。偶数个w奇数b
#include<iostream>
#include<string>
using namespace std;
int main()
{
int sum=0;
string a;
while(cin>>a)
{
if(a!="END")
sum++;
else
{if(sum%2==0)
cout<<"W "<<sum<<endl;
else
cout<<"B "<<sum<<endl;
sum=0;
}
}
return 0;
}