[Python3] dp
Please check out this commit for solutions of weekly 257.\n\nclass Solution:\n    def firstDayBeenInAllRooms(self, nextVisit: List[int]) -> int:\n        odd = 
Please check out this [commit](https://github.com/gaosanyong/leetcode/commit/84115397f703f3005c3ae0d5d759f4ac64f65de4) for solutions of weekly 257.\n```\nclass Solution:\n    def firstDayBeenInAllRooms(self, nextVisit: List[int]) -> int:\n        odd = [0]\n        even = [1]\n        for i in range(1, len(nextVisit)): \n            odd.append((even[-1] + 1) % 1_000_000_007)\n            even.append((2*odd[-1] - odd[nextVisit[i]] + 1) % 1_000_000_007)\n        return odd[-1] \n```
['Python3']