摘要:
const int N=100010; int n, a, b; vector<int> e[N];//用vector作邻接表 int siz[N], pos, ans=1e9; void dfs(int x, int fa){ siz[x]=1; int mx=0; for(auto y : e[ 阅读全文
posted @ 2023-12-05 19:52
potential-star
阅读(11)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P4316 本题暂时只写了用期望dp经典套路,套上期望DP的基本套路,设dp(u)为到达u点的期望长度。 期望dp,也叫概率dp 一般来说,期望dp找到正确的状态后,转移是比较容易想到的。 但一般情况下,状态一定是“可数”的 事实上, 阅读全文
posted @ 2023-12-05 00:56
potential-star
阅读(25)
评论(0)
推荐(0)

浙公网安备 33010602011771号