题目:http://codeforces.com/contest/259/problem/A
判断一个棋盘经过行操作后能否成为一个正常的黑白相间的棋盘
思路:因为不涉及列操作 只要每行都是黑白相间就可以满足条件
#include#include using namespace std;int a,b,n;int main(){ bool ans=true; char start,previous,current; for(int i=0;i<8;i++) { cin >> current; start=previous=current; for(int j=0;j<6;j++) { cin>>current; if(current==previous)ans=0; previous=current; } cin>>current; if(current==previous||current==start) ans=0; } if(ans) cout << "YES"<