#include<stdio.h>
#include<string.h>
int main ()
{
    char a[9],b[9],c[9];
    int i,flag=0;
    strcpy(a,"WBWBWBWB");
    strcpy(b,"BWBWBWBW");
    for(i=1;i<=8;i++)
    {
        scanf("%s",c);
        if(strcmp(a,c)!=0&&strcmp(b,c)!=0)
        {
            flag=1;
        }
    }
    if(flag==0)
    printf("YES");
    else printf("NO");
    return 0;
}

http://codeforces.com/contest/259/problem/A

posted on 2013-01-18 23:15  海暗  阅读(248)  评论(0编辑  收藏  举报