mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 19:53:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p><code>m</code>*<code>n</code> 的二维数组 <code>plants</code> 记录了园林景观的植物排布情况,具有以下特性:</p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li>每行中,每棵植物的右侧相邻植物不矮于该植物;</li>
 | 
						||
	<li>每列中,每棵植物的下侧相邻植物不矮于该植物。</li>
 | 
						||
</ul>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p>请判断 <code>plants</code> 中是否存在目标高度值 <code>target</code>。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>plants = [[2,3,6,8],[4,5,8,9],[5,9,10,12]], target = 8
 | 
						||
 | 
						||
<strong>输出:</strong>true
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>plants = [[1,3,5],[2,5,7]], target = 4
 | 
						||
 | 
						||
<strong>输出:</strong>false
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>0 <= n <= 1000</code></li>
 | 
						||
	<li><code>0 <= m <= 1000</code></li>
 | 
						||
</ul>
 | 
						||
 | 
						||
<p>注意:本题与主站 240 题相同:<a href="https://leetcode-cn.com/problems/search-a-2d-matrix-ii/" rel="noopener noreferrer" target="_blank">https://leetcode-cn.com/problems/search-a-2d-matrix-ii/</a></p>
 | 
						||
 | 
						||
<p> </p>
 |