Python using choices with weight
\nimport random\nclass Solution:\n    def __init__(self, rects: List[List[int]]):\n        self.rects = rects\n        self.weights = []\n        for i, r in en
```\nimport random\nclass Solution:\n    def __init__(self, rects: List[List[int]]):\n        self.rects = rects\n        self.weights = []\n        for i, r in enumerate(self.rects):\n            x1, y1, x2, y2 = r\n            self.weights.append((x2-x1+1)*(y2-y1+1))\n    def pick(self) -> List[int]:\n        points = []\n        for i, r in enumerate(self.rects):\n            x1, y1, x2, y2 = r\n            x, y = random.randint(x1, x2), random.randint(y1, y2)\n            points.append((x,y))\n        # using weights is the weight the possibility based on area of each rect\n        # bigger area will get higher chance\n        return random.choices(points, weights=self.weights, cum_weights=None, k=1)[0]\n```
[]