英语翻译18

https://www.luogu.com.cn/problem/CF16A题目描述

According to a new ISO standard, a flag of every country should have a chequered field n×mn×m , each square should be of one of 10 colours, and the flag should be «striped»: each horizontal row of the flag should contain squares of the same colour, and the colours of adjacent horizontal rows should be different. Berland's government asked you to find out whether their flag meets the new ISO standard.

 

输入格式

The first line of the input contains numbers nn and mm ( 1<=n,m<=1001<=n,m<=100 ), nn — the amount of rows, mm — the amount of columns on the flag of Berland. Then there follows the description of the flag: each of the following nn lines contain mm characters. Each character is a digit between 0 and 9, and stands for the colour of the corresponding square.

 

输出格式

Output YES, if the flag meets the new ISO standard, and NO otherwise.

根据新的IOS标准,每个国家的国旗应该由n*m个格子组成,其中每个格子最多有 1010 种不同的颜色。并且国旗应该有条纹:旗帜的每一行应包含相同颜色的方块,相邻的行的颜色应该是不同的。Berland 政府要求你找出他们的国旗是否符合新的 ISO 标准。

输入的第一行包含数 nn 和 mm,其中 nn 为行数,mm 为列数。接下来是对旗的描述:以下 nn 行中的每一行包含 mm 个字符。每个字符是 00 到 99 之间的数字,代表相应正方形的颜色。

​​​​​​​如果国旗符合标准就输出 YES,否则输出 NO。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值