<commit_before>class Solution {
    public:
        int maxPoints(vector<Point> &points) {
            int maxCount = 0;
            for(int i = 0; i != points.size(); ++i){
                for(int j = 0; j < i; ++j){
                    int count = 0;
                    for(int k = 0; k != points.size(); ++k){
                        if(k != i && k !=j){
                            if(points[i].x == points[j].x){
                                if(points[k].x == points[i].x) count ++;
                            }
                            else if(points[i].y == points[j].y){
                                if(points[k].y == points[i].y) count ++;
                            }
                            else{
                                if((points[k].y-points[i].y)/(points[j].y-points[i].y)-(points[k].x-points[i].x)/(points[j].x-points[i].x) == 0) count ++;
                            }
                        }
                    }
                    if(count > maxCount) maxCount = count;
                }
            }
            return maxCount;
        }
};<commit_msg>add a O(n^2*lgn) solution, accepted<commit_after>class Solution {
    public:
        int maxPoints(vector<Point> &points) {
            int maxCount = 0;
            if(points.size() == 0) return maxCount;
            for(int i = 0; i != points.size(); ++i){
                int count = 0, n = 0;
                unordered_map<double, int> umap;
                for(int j = 0; j != points.size(); ++j){
                    int dx = points[j].x - points[i].x;
                    int dy = points[j].y - points[i].y;
                    double slope = std::numeric_limits<double>::infinity();
                    if(dx == 0 && dy == 0){n ++; continue;}
                    else if(dx != 0) slope = ((double)dy)/dx;
                    int tmp = 0;
                    if(umap.find(slope) != umap.end()) tmp = umap[slope];
                    umap[slope] = tmp + 1;
                    if(count < tmp + 1) count = tmp + 1;
                }
                if(maxCount < count + n) maxCount = count + n;
            }
            return maxCount;
        }
};
{'fraction_non_alphanumeric': 0.15013901760889714, 'fraction_numerical': 0.009267840593141797, 'mean_word_length': 1.01024208566108, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '779534', 'n_tokens_mistral': 652, 'n_tokens_neox': 603, 'n_words': 137}