版本比较
题解:P9847 [ICPC 2021 Nanjing R] Crystalfly
正文
增加 1 行删除 1 行
78 行未改动7980818283838485868717 行未改动78 行未改动void test_solve() { cin >> n; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i <= n; i++) cin >> t[i]; for(int i = 1, x, y; i < n; i++) for(int i = 1, x, y; i < n; i++) cin >> x >> y, G[x].push_back(y), G[y].push_back(x); dfs(1, 0); cout << f[1] + a[1] << "\n"; for(int i = 1; i <= n; i++) G[i].clear(), f[i] = g[i] = 0;17 行未改动