警示后人

P2986 [USACO10MAR] Great Cow Gathering G

- 不能用 `ios::sync_with_stdio(0);` 然后用 `cin` 会 WA+TLE; - 不能把 `f[e[i].v] = f[x] - s[e[i].v] * e[i].w + (sum - s[e[i].v]) * e[i].w;` 缩成 `f[e[i].v] = f[x] + (sum - 2 * s[e[i].v]) * e[i].w;` 会WA
by 2huk @ 2023-06-30 22:10:21


@[2huk](/user/748509) 两个都可以用吧。 我的代码实测没有 wa 啊。 [测评记录](/record/119080039)
by cjrqwq @ 2023-08-05 07:58:24


|