mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-14 03:41:41 +08:00
add leetcode problem-cn part1
This commit is contained in:
29
算法题(国内版)/problem (Chinese)/有效的回旋镖 [valid-boomerang].html
Normal file
29
算法题(国内版)/problem (Chinese)/有效的回旋镖 [valid-boomerang].html
Normal file
@@ -0,0 +1,29 @@
|
||||
<p>给定一个数组<meta charset="UTF-8" /> <code>points</code> ,其中<meta charset="UTF-8" /> <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> 表示 <strong>X-Y</strong> 平面上的一个点,<em>如果这些点构成一个 </em><strong>回旋镖</strong> 则返回 <code>true</code> 。</p>
|
||||
|
||||
<p><strong>回旋镖</strong> 定义为一组三个点,这些点 <strong>各不相同</strong> 且 <strong>不在一条直线上</strong> 。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>points = [[1,1],[2,3],[3,2]]
|
||||
<strong>输出:</strong>true
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>points = [[1,1],[2,2],[3,3]]
|
||||
<strong>输出:</strong>false</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
<ul>
|
||||
<li><code>points.length == 3</code></li>
|
||||
<li><code>points[i].length == 2</code></li>
|
||||
<li><code>0 <= x<sub>i</sub>, y<sub>i</sub> <= 100</code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user