P3118 [USACO15JAN]Moovie Mooving G Link 题目描述 Bessie is out at the movies. Being mischievous as always, she has decided to hide from Farmer John for L (1 <= L <= 100,000,000) minutes, during which time she wants to watch movies continuously. She has…
[USACO15JAN]Moovie Mooving G 状压难题.不过也好理解. 首先我们根据题意: she does not want to ever visit the same movie twice. 这句话以及\(n\)的取值范围给了我们足够多的提醒:可能是状态压缩. 那么,当我们真正尝试用集合表示每个电影是否已看过的时候,我们却不容易给出能够转移的状态. 举个例子,当我们定义的状态中集合表示成为该状态的元素,那么这将会与最终求该集合的最小值冲突--状态中没法记录集合的最小值. 我们…