01 2021 档案
摘要:题目 P4103 [HEOI2014]大工程 思路 虚树 + dp。 共有 \(n-1\) 条边,\(k\) 个询问点,用 \((u_i,v_i,w_i)\) 表示第 \(i\) 条边是从 \(u_i\) 到 \(v_i\) 花费为 \(w_i\) 的一条边。那么用 \(sz\) 维护每个点的子树中
        阅读全文
                
摘要:未分类 轻重链剖分 // time : 20210103 // test on https://www.luogu.com.cn/problem/P3384 #include <cstdio> #include <cstring> #include <string> #include <iostre
        阅读全文
                

浙公网安备 33010602011771号