关于线段树合并

学术版

mayike @ 2024-11-29 15:39:47

在遇到这种转移:

f_{u,0}=\sum_{v\in son_u} f_{v,1} f_{u,1}=a_u+\sum_{v\in son_u}\min(f_{v,0},f_{v,1})

第二种的 \min(f_{v,0},f_{v,1}) 在线段树合并时怎么转移啊


by Ooj_bai @ 2024-11-29 16:28:09

出门右转看题解谢谢 https://www.luogu.com.cn/problem/solution/P5024


by mayike @ 2024-11-29 16:29:04

@Ooj_bai 如此友善!


by FBW2010 @ 2024-11-29 16:29:38

@mayike 啊对


by mayike @ 2024-11-29 16:30:17

@qiuzijin2026@FBW2010 你们真是天才!


by tyr_04 @ 2024-11-29 16:33:59


上一页 |