C++, easy and slow, beats 100%
```\nclass Solution {\npublic:\n    vector> rect;\n    vector r_area;\n    int total_area;\n    Solution(vector> rects) {\n        rect = rects;\n        int to
```\nclass Solution {\npublic:\n    vector<vector<int>> rect;\n    vector<int> r_area;\n    int total_area;\n    Solution(vector<vector<int>> rects) {\n        rect = rects;\n        int total = 0;\n        for (int i = 0; i < rects.size(); i++) {\n            total += (rects[i][2] - rects[i][0]+1)*(rects[i][3] - rects[i][1]+1);\n            r_area.push_back(total);\n        }\n        total_area = total;\n    }\n    \n    vector<int> pick() {\n        int random_area = rand()%total_area+1;\n        int i = 0;\n        for (; i < r_area.size(); i++) {\n            if (random_area <= r_area[i]) break;\n        }\n        int dis_x = rand()%(rect[i][2] - rect[i][0]+1);\n        int dis_y = rand()%(rect[i][3] - rect[i][1]+1);\n        return {rect[i][0] + dis_x, rect[i][1] + dis_y};\n    }\n};\n\n/**\n * Your Solution object will be instantiated and called as such:\n * Solution obj = new Solution(rects);\n * vector<int> param_1 = obj.pick();\n */
[]