当前位置:网站首页>力扣1037. 有效的回旋镖
力扣1037. 有效的回旋镖
2022-07-06 17:22:00 【秀强】
题目
给定一个数组 points ,其中 points[i] = [xi, yi] 表示 X-Y 平面上的一个点,如果这些点构成一个 回旋镖 则返回 true 。
回旋镖 定义为一组三个点,这些点 各不相同 且 不在一条直线上 。
来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/valid-boomerang
向量叉乘

代码
class Solution {
public boolean isBoomerang(int[][] points) {
// 向量叉乘
return (points[0][0] - points[1][0]) * (points[1][1] - points[2][1]) - (points[0][1] - points[1][1]) * (points[1][0] - points[2][0]) != 0;
}
}
边栏推荐
- Anfulai embedded weekly report no. 272: 2022.06.27--2022.07.03
- 再聊聊我常用的15个数据源网站
- 【JVM调优实战100例】04——方法区调优实战(上)
- Levels - UE5中的暴雨效果
- 深度学习框架TF安装
- Chenglian premium products has completed the first step to enter the international capital market by taking shares in halber international
- mysql: error while loading shared libraries: libtinfo. so. 5: cannot open shared object file: No such
- 深度学习之线性代数
- 代码克隆的优缺点
- 【JokerのZYNQ7020】AXI_ EMC。
猜你喜欢

pytorch之数据类型tensor

Five different code similarity detection and the development trend of code similarity detection
深入探索编译插桩技术(四、ASM 探秘)

Lombok makes ⽤ @data and @builder's pit at the same time. Are you hit?

学习光线跟踪一样的自3D表征Ego3RT

windows安装mysql8(5分钟)
![[Batch dos - cmd Command - Summary and Summary] - String search, find, Filter Commands (FIND, findstr), differentiation and Analysis of Find and findstr](/img/4a/0dcc28f76ce99982f930c21d0d76c3.png)
[Batch dos - cmd Command - Summary and Summary] - String search, find, Filter Commands (FIND, findstr), differentiation and Analysis of Find and findstr

深度学习之环境配置 jupyter notebook

ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版

Dell筆記本周期性閃屏故障
随机推荐
建立自己的网站(17)
[hfctf2020]babyupload session parsing engine
Learning notes 5: ram and ROM
Summary of being a microservice R & D Engineer in the past year
Let's talk about 15 data source websites I often use
Trace tool for MySQL further implementation plan
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
. Bytecode structure of class file
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
mysql: error while loading shared libraries: libtinfo. so. 5: cannot open shared object file: No such
New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML
Chenglian premium products has completed the first step to enter the international capital market by taking shares in halber international
Dynamic planning idea "from getting started to giving up"
pytorch之数据类型tensor
【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
[C language] dynamic address book
第七篇,STM32串口通信编程
「精致店主理人」青年创业孵化营·首期顺德场圆满结束!
A brief history of deep learning (I)
Explain in detail the matrix normalization function normalize() of OpenCV [norm or value range of the scoped matrix (normalization)], and attach norm_ Example code in the case of minmax