文件名称:111
-
所属分类:
- 标签属性:
- 上传时间:2015-12-20
-
文件大小:1.38kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
有一个n*m的草坪(1<=n,m<=100),草坪中的草原来的高度都是100。现在使用割草机修剪草坪,来得到各种各样的图案。割草机只 能横着或者竖着割草。每次割草都会先设定一个高度,割完之后会把比设定高度高的草都割成设定的高度。比如草原来是5 2 8,设定高度为4,那么割完之后就变成了4 2 4。
现在给出一个图案,问是否可以把草坪割成图案的样子。
Input
输入第一行包含两个整数n和m。
接下来为n行输入,每行包含m个不大于100的正整数。
Output
如果可以修剪成输入的图案,则输出“YES”,否则输出“NO”。
Sample input
3 3
2 1 2
1 1 1
2 1 2
Samput Output
YES
标
输出:
-A n* m of lawn (1 < = n, m < = 100), the height of the prairie grass is 100. Now use the mower to mow the lawn to get a variety of patterns. Mower mowing only sideways or vertically. Every mowing will first set a height, height after height higher than the set would mown grass are cut into the set. For example, the prairie is 528, set height to 4, then after Gewan becomes 424. We will now be given a pattern, asked if he could put the lawn cut into a pattern look. Input Input The first line contains two integers n and m. Next, an n-line input, each line contains no more than 100 m a positive integer. Output If the input can be trimmed into a pattern, output " YES" , otherwise output " NO" . Sample input 3 3 2 1 2 1 1 1 2 1 2 Samput Output YES standard output:
现在给出一个图案,问是否可以把草坪割成图案的样子。
Input
输入第一行包含两个整数n和m。
接下来为n行输入,每行包含m个不大于100的正整数。
Output
如果可以修剪成输入的图案,则输出“YES”,否则输出“NO”。
Sample input
3 3
2 1 2
1 1 1
2 1 2
Samput Output
YES
标
输出:
-A n* m of lawn (1 < = n, m < = 100), the height of the prairie grass is 100. Now use the mower to mow the lawn to get a variety of patterns. Mower mowing only sideways or vertically. Every mowing will first set a height, height after height higher than the set would mown grass are cut into the set. For example, the prairie is 528, set height to 4, then after Gewan becomes 424. We will now be given a pattern, asked if he could put the lawn cut into a pattern look. Input Input The first line contains two integers n and m. Next, an n-line input, each line contains no more than 100 m a positive integer. Output If the input can be trimmed into a pattern, output " YES" , otherwise output " NO" . Sample input 3 3 2 1 2 1 1 1 2 1 2 Samput Output YES standard output:
(系统自动生成,下载前可以参看下载内容)
下载文件列表
修剪草坪.cpp
未命名2.cpp
未命名2.cpp
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
