版本比较
题解 BZOJ1767 harbingers
正文
增加 1 行删除 1 行
37 行未改动3839404142424344454623 行未改动37 行未改动 if(x <= m) res = min(res, qu(l, m, ch[u][0], x)); else res = min(res, qu(m + 1, r, ch[u][1], x)); return min(0ll, res);}LL f[CN], h[CN]; LL f[CN], h[CN];void dfs(int u, int p){ int lst = idx; LL res = qu(1, 1e9, rt[p], V[u]); f[u] = W[u] + h[u] * V[u] + res; tmp.k = -h[u], tmp.b = f[u], md(1, 1e9, rt[u], rt[p], tmp);23 行未改动