题目链接: Hearthstone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Hearthstone is an online collectible card game from Blizzard Entertainment. Strategies and luck are the most important factors…
状压DP :F(S)=Sum*F(S)+p(x1)*F(S^(1<<x1))+p(x2)*F(S^(1<<x2))...+1; F(S)表示取状态为S的牌的期望次数,Sum表示什么都不取得概率,p(x1)表示的是取x1的概率,最后要加一因为有又多拿了一次.整理一下就可以了. #include <cstdio> ; <<Maxn],p[Maxn]; int n; int main() { while (scanf("%d",&n)!…