CF462A.Appleman and Easy Task
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Toastman came up with a very easy task. He gives it to Appleman, but Appleman doesn't know how to solve it. Can you help him?
Given a n×n checkerboard. Each cell of the board has either character 'x', or character 'o'. Is it true that each cell of the board has even number of adjacent cells with 'o'? Two cells of the board are adjacent if they share a side.
输入格式
The first line contains an integer n ( 1<=n<=100 ). Then n lines follow containing the description of the checkerboard. Each of them contains n characters (either 'x' or 'o') without spaces.
输出格式
Print "YES" or "NO" (without the quotes) depending on the answer to the problem.
输入输出样例
输入#1
3 xxo xox oxx
输出#1
YES
输入#2
4 xxxo xoxo oxox xxxx
输出#2
NO