mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 19:53:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定四个整数 <code>sx</code> , <code>sy</code> ,<code>tx</code> 和 <code>ty</code>,如果通过一系列的<strong>转换</strong>可以从起点 <code>(sx, sy)</code> 到达终点 <code>(tx, ty)</code>,则返回 <code>true</code>,否则返回 <code>false</code>。</p>
 | 
						||
 | 
						||
<p>从点 <code>(x, y)</code> 可以<strong>转换</strong>到 <code>(x, x+y)</code>  或者 <code>(x+y, y)</code>。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong> sx = 1, sy = 1, tx = 3, ty = 5
 | 
						||
<strong>输出:</strong> true
 | 
						||
<strong>解释:
 | 
						||
</strong>可以通过以下一系列<strong>转换</strong>从起点转换到终点:
 | 
						||
(1, 1) -> (1, 2)
 | 
						||
(1, 2) -> (3, 2)
 | 
						||
(3, 2) -> (3, 5)
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong> sx = 1, sy = 1, tx = 2, ty = 2 
 | 
						||
<strong>输出:</strong> false
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 3:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong> sx = 1, sy = 1, tx = 1, ty = 1 
 | 
						||
<strong>输出:</strong> true
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>1 <= sx, sy, tx, ty <= 10<sup>9</sup></code></li>
 | 
						||
</ul>
 |