mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
<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>
|