随笔分类 - 数据结构--倍增LCA
摘要:题:https://loj.ac/problem/2013 题:https://www.luogu.com.cn/problem/P3292 题意:给定n个节点的树,每个节点都有权值,q组查询[u, v]查询u到v的最短路径上的点权能组成的最大异或和; 分析:朴素地想,肯定是每次u到v上的点全部塞到
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号