Java Solution. Randomly pick a rectangle then pick a point inside.
\nclass Solution {\n    TreeMap<Integer, Integer> map;\n    int[][] arrays;\n    int sum;\n    Random rnd= new Random();\n    \n    public Solution(int[][] rect
```\nclass Solution {\n    TreeMap<Integer, Integer> map;\n    int[][] arrays;\n    int sum;\n    Random rnd= new Random();\n    \n    public Solution(int[][] rects) {\n        arrays = rects;\n        map = new TreeMap<>();\n        sum = 0;\n        \n        for(int i = 0; i < rects.length; i++) {\n            int[] rect = rects[i];\n\t\t\t\t\t\t\n            // the right part means the number of points can be picked in this rectangle\n            sum += (rect[2] - rect[0] + 1) * (rect[3] - rect[1] + 1);\n\t\t\t\n            map.put(sum, i);\n        }\n    }\n    \n    public int[] pick() {\n        // nextInt(sum) returns a num in [0, sum -1]. After added by 1, it becomes [1, sum]\n        int c = map.ceilingKey( rnd.nextInt(sum) + 1);\n        \n        return pickInRect(arrays[map.get(c)]);\n    }\n    \n    private int[] pickInRect(int[] rect) {\n        int left = rect[0], right = rect[2], bot = rect[1], top = rect[3];\n        \n        return new int[]{left + rnd.nextInt(right - left + 1), bot + rnd.nextInt(top - bot + 1) };\n    }\n}\n```
[]