随笔分类 - 概率/期望
摘要:洛谷传送门 CF 传送门 印度出题人玩原神玩的吧??? 考虑计算每条折线被选的概率。考虑相当于是有一个 的排列 ,然后一条 的直线被选且不是最后一个被选的,当且仅当它在 中排在 \(x = 1 \sim i - 1\
阅读全文
摘要:洛谷传送门 AtCoder 传送门 人生中第一道 AtCoder 问号题。 设 。 注意到 的定义式中, 大概是启示我们转成概率去做。发现若把 换成 \(\frac{1}{n - 1}\
阅读全文
摘要:洛谷传送门 感觉跟 CF Gym 102978H Harsh Comments 很像。 考虑容斥,钦定 中的人比 后死。设 为 中的人比 后死的概率,那么答案为: \[ans = \sum\limit
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P4548 "洛谷传送门") 结论:答案为 。 记一下两种理解方法。 假设有人开了一个赌场,每一秒钟有一位赌
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc238_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc238/tasks/abc238_h "AtCoder 传送门") 考虑期望转计数,方
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1842G "洛谷传送门") [CF 传送门](https://codeforces.com/contest/1842/problem/G "CF 传送门") 原来还不会这种拆期望的套路
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc154_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc154/tasks/arc154_e "AtCoder 传送门") 好题! 考虑如何更
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc242_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc242/tasks/abc242_h "AtCoder 传送门") 好久没复习过 mi
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc253_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc253/tasks/abc253_h "AtCoder 传送门") 没做出来。 考虑求
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc149_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc149/tasks/abc149_f "AtCoder 传送门") 不错的题。 考虑题
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc132_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc132/tasks/arc132_e "AtCoder 传送门") 感觉挺 educa
阅读全文
摘要:洛谷传送门 AtCoder 传送门 挺有意思的计数。 计数感觉很难做,不妨转成期望,期望又可以转成概率之和。 考虑枚举 ,把 的数设为 , 的数设为 。那么期望就是所有 , 为 的概率之和。对于一个 ,
阅读全文
摘要:洛谷传送门 CodeForces 传送门 看到询问次数接近 ,考虑将 分成多组,每组都以较少的期望询问次数解决。 先询问一次全 F,接下来的询问就能确定若干个位置的 T 个数。考虑每次从答案未确定的问题集合中随 个(如果集合大小 就暴力),先问这 个中 T
阅读全文
摘要:### 公式 普通 min-max 容斥: $$\min
阅读全文
摘要:CF 传送门 洛谷传送门 很强的一个题。 发现根的选择很重要,于是考虑先枚举根。 考虑枚举两个点对 ,如果 比 先被标记,那么 就贡献了一个逆序对。将所有 比 先被标记的概率加起来就是期望。 对于 ,当 $\operato
阅读全文