摘要:
思路是O(n^2)的,就是取一个点,和其他所有的点比,如果斜率一样的就在一条线上。这里要注意有重复的点,另外,学会了float也可以做map的key,还有map[k]++也覆盖了一开始count为0的情况。参考:http://blog.csdn.net/doc_sgl/article/details/17103427#include using namespace std;class Solution {public: int maxPoints(vector &points) { int ans = 0; int size = points.size(); ... 阅读全文
posted @ 2013-12-26 23:33
阿牧遥
阅读(269)
评论(0)
推荐(0)

浙公网安备 33010602011771号