Four lines of Python
\nfrom random import randint\nfrom bisect import bisect_right\n\nclass Solution:\n\n    def __init__(self, N: int, blacklist: List[int]):\n        self.num_choi
```\nfrom random import randint\nfrom bisect import bisect_right\n\nclass Solution:\n\n    def __init__(self, N: int, blacklist: List[int]):\n        self.num_choices = N - len(blacklist)\n        self.search_list = [b - i for i, b in enumerate(sorted(blacklist))]\n        \n    def pick(self) -> int:\n        rand_n = randint(0, self.num_choices-1)\n        \n        return rand_n + bisect_right(self.search_list, rand_n)\n\n```
[]