文章分类 -  数据结构(ds) / 字典树(Trie)

摘要:\(n\) 个点,点有点权,两两之间连边为端点权值的按位异或结果,求 \(\text{MST}\) 模板题:CF888G Xor-MST 将点按权值从小到大排序,则 \(\text{Trie}\) 中一棵子树对应一个区间,每个结点保证对应的区间 对于每个非叶子结点,若两个子树都不为空,则从两个子树内 阅读全文
posted @ 2025-05-08 14:59 Hstry 阅读(15) 评论(0) 推荐(0)
摘要:普通 Trie 模板: namespace trie { template <size_t _val_max> struct trie { static constexpr size_t value_max = _val_max;// 字符集为 [0,value_max) 内的整数 struct n 阅读全文
posted @ 2025-03-15 15:08 Hstry 阅读(5) 评论(0) 推荐(0)