五子棋


AC代码
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int f=0;
string s;
while(cin>>s)
{
if(s!="END")
f++;
else if(f%2==0)
{
cout<<"W"<<" "<<f<<endl;
f=0;
}
else
{
cout<<"B"<<" "<<f<<endl;
f=0;
}
}
return 0;
}
本文来自博客园,作者:斯文~,转载请注明原文链接:https://www.cnblogs.com/zhiweb/p/15483361.html

浙公网安备 33010602011771号