Python | Binary Search | O(logn) per Pick
```\nfrom itertools import accumulate\nfrom random import randint\nfrom bisect import bisect_left\nclass Solution:\n\n    def init(self, rects: List[List[int]])
```\nfrom itertools import accumulate\nfrom random import randint\nfrom bisect import bisect_left\nclass Solution:\n\n    def __init__(self, rects: List[List[int]]):\n        self.rects = rects\n        self.acc = list(accumulate([ (x2-x1+1)*(y2-y1+1) for x1, y1, x2, y2 in rects ], initial = 0))\n\n    def pick(self) -> List[int]:\n        r = randint(1, self.acc[-1])\n        i = bisect_left(self.acc, r)\n        delta = r - self.acc[i-1] - 1\n        x1, y1, x2, y2 = self.rects[i-1]\n        dx, dy = delta % (x2-x1+1), delta // (x2-x1+1) \n        return (x1 + dx, y1 + dy)
['Python']