版本比较
题解:P6383 『MdOI R2』Resurrection
正文
增加 1 行删除 1 行
28 行未改动2930313233333435363713 行未改动28 行未改动int n, u, v, f[N][N], ans = 1;vector<int> to[N];
inline void dfs(int u, int fa, int dep){ bool leaf = true; bool leaf = true; for(auto v : to[u]) if(v ^ fa) leaf = false, dfs(v, u, dep + 1); for(int i = 0; i <= dep - 1; ++i){ int res = 1; for(auto v : to[u]) if(v ^ fa) res = res * f[v][i + 1] % mod;13 行未改动