摘要: 题解 一道神仙的题 include include include include include define enter putchar('\n') define space putchar(' ') define mp make_pair define pb push_back define 阅读全文
posted @ 2018-06-23 20:09 sigongzi 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 题解 感觉极其神奇的状压dp $dp[i][S]$表示答案为i,然后不可选的点集为S 我们每次往答案里加一个点,然后方案数是,设原来可以选的点数是y,新加入一个点后导致了除了新加的点之外x个点不能选,那么方案就是把x个数在y 1(由于空余位置的第一个要放我们选的那个点)个位置里任意排列,方案数是$A 阅读全文
posted @ 2018-06-23 15:52 sigongzi 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题解 由于强化卡都是大于1的,我们分析一下就会发现,尽可能多的用强化卡,至少用一张攻击卡,一定是每组卡牌的最优选择 所以我们把攻击卡和强化卡从大到小排序 我们设$g[i][j]$表示前i张卡牌里选择j张强化卡,能强化的倍数之和 如果$j include include include include 阅读全文
posted @ 2018-06-23 13:43 sigongzi 阅读(156) 评论(0) 推荐(1) 编辑