1
class Solution {
2
public:
3
bool isBoomerang(vector<vector<int>> &points) {
4
if (points.size() <= 2) return false;
5
int x0 = points[0][0], y0 = points[0][1];
6
int x1 = points[1][0], y1 = points[1][1];
7
int x2 = points[2][0], y2 = points[2][1];
8
int dx1 = x1 - x0, dy1 = y1 - y0;
9
int dx2 = x2 - x1, dy2 = y2 - y1;
10
if (dy1 * dx2 == dy2 * dx1) return false;
11
return true;
12
}
13
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0