文件名称:cut-glass
介绍说明--下载内容均来自于网络,请自行研究使用
有一个n*m的草坪(1< n,m< 100),草坪中的草原来的高度都是100。现在使用割草机修剪草坪,来得到各种各样的图案。割草机只 能横着或者竖着割草。每次割草都会先设定一个高度,割完之后会把比设定高度高的草都割成设定的高度。比如草原来是5 2 8,设定高度为4,那么割完之后就变成了4 2 4。
现在给出一个图案,问是否可以把草坪割成图案的样子。
输入第一行包含两个整数n和m。
接下来为n行输入,每行包含m个不大于100的正整数。
如果可以修剪成输入的图案,则输出“YES”,否则输出“NO”。
-A n* m of lawn (1 < n, m < 100), the height of the lawn to prairie is 100. Now use the mower to mow the lawn, to get a variety of patterns. Mower mowing only sideways or vertically. Each mowing will first set a height, the height would then mown grass higher than the set height are cut into the set. For example, the prairie is 528, set the height of 4, then after mown becomes 424. We will now be given a pattern and asked if I can cut into the lawn pattern look. Input The first line contains two integers n and m. Next, the n input lines, each line contains no more than 100 m a positive integer. If the input can be trimmed into a pattern, the output " YES" , otherwise output " NO" .
现在给出一个图案,问是否可以把草坪割成图案的样子。
输入第一行包含两个整数n和m。
接下来为n行输入,每行包含m个不大于100的正整数。
如果可以修剪成输入的图案,则输出“YES”,否则输出“NO”。
-A n* m of lawn (1 < n, m < 100), the height of the lawn to prairie is 100. Now use the mower to mow the lawn, to get a variety of patterns. Mower mowing only sideways or vertically. Each mowing will first set a height, the height would then mown grass higher than the set height are cut into the set. For example, the prairie is 528, set the height of 4, then after mown becomes 424. We will now be given a pattern and asked if I can cut into the lawn pattern look. Input The first line contains two integers n and m. Next, the n input lines, each line contains no more than 100 m a positive integer. If the input can be trimmed into a pattern, the output " YES" , otherwise output " NO" .
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cut glass\Makefile.win
.........\cut glass.txt
.........\cut.dev
.........\cut.exe
.........\cut.layout
.........\main.cpp
.........\main.o
cut glass