随笔分类 -  数据结构--倍增LCA

摘要:题:https://loj.ac/problem/2013 题:https://www.luogu.com.cn/problem/P3292 题意:给定n个节点的树,每个节点都有权值,q组查询[u, v]查询u到v的最短路径上的点权能组成的最大异或和; 分析:朴素地想,肯定是每次u到v上的点全部塞到 阅读全文
posted @ 2020-10-13 23:15 starve_to_death 阅读(152) 评论(0) 推荐(0)
摘要:http://codevs.cn/problem/2370/ #include<bits/stdc++.h> using namespace std; const int M=5e4+5; const int N=20; struct node{ int v,w; node(int vv=0,int 阅读全文
posted @ 2019-07-17 14:40 starve_to_death 阅读(128) 评论(0) 推荐(0)