1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/有效的回旋镖 [valid-boomerang].html
2022-03-29 12:43:11 +08:00

30 lines
1.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定一个数组<meta charset="UTF-8" />&nbsp;<code>points</code>&nbsp;,其中<meta charset="UTF-8" />&nbsp;<code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code>&nbsp;表示 <strong>X-Y</strong> 平面上的一个点,<em>如果这些点构成一个&nbsp;</em><strong>回旋镖</strong>&nbsp;则返回&nbsp;<code>true</code>&nbsp;</p>
<p><strong>回旋镖</strong>&nbsp;定义为一组三个点,这些点&nbsp;<strong>各不相同</strong>&nbsp;&nbsp;<strong>不在一条直线上</strong>&nbsp;</p>
<p>&nbsp;</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>&nbsp;</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 &lt;= x<sub>i</sub>, y<sub>i</sub>&nbsp;&lt;= 100</code></li>
</ul>