Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

例题9-15 s1和s2的计算可简化 #49

Open
qiucwang opened this issue Jun 8, 2020 · 0 comments
Open

例题9-15 s1和s2的计算可简化 #49

qiucwang opened this issue Jun 8, 2020 · 0 comments

Comments

@qiucwang
Copy link

qiucwang commented Jun 8, 2020

范例代码中,为了计算s1(只有一个老师能授课的课程集合)和s2(至少有两个老师能授课的课程集合),作者引入了s0。但其实不需要s0。
对于雇佣第i名老师,下一轮次的dp改为:
dp(i+1, s1^st[i], s2|(s1&st[i])即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant