leetcode-149-直线上最多的点数

//使用除法会有精度问题,借用最大公约数(辗转相除)构造pair代替斜率k class Solution { public:     int gcd(int x, int y) {         return y == 0 ? x : gcd(y, x%y);     }     int maxPoints(vector<vector<int>>& points) {         if (p
相关文章
相关标签/搜索