摘要:
期望DP 数学期望 P=Σ(每一种状态的价值*对应的概率) E(aX+bY)=aE(x)+bE(y)E(aX+bY)=aE(x)+bE(y) 数学期望的dp[x]一般表示到了x这一状态还差多少,最后答案是dp[0]。 期望DP步骤一般是先推数学公式,再找递推关系 1 Help Me Escape z 阅读全文
摘要:
A - Xor Sum Zeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 Zeus 需要在集合当中找出一个正整数 K ,使得 K 与 阅读全文
摘要:
D - CombinationsGiven n different objects, you want to take k of them. How many ways to can do it? For example, say there are 4 items; you want to tak 阅读全文
摘要:
~~今天好颓啊,上下午才打了两个容斥题~~ ~~容斥定理?不就是小学的韦恩图吗,加加减减的,这有什么大道理?~~ 然后我看到了今天的讲义!和题目! A Co prime Given a number N, you are asked to count the number of integers b 阅读全文