【JZOJ A组】e

Description Input Output Sample Input 见下发文件 Sample Output 见下发文件 Data Constraint 思路 首先,对于一个最小联通块就是从每个点出发,到他们所有点公共的lca的所有链组成 那么我们就需要查询一条到祖先的链上的权值中r的前驱后继 然后就是主席树 代码 #include<cstdio> #include<iostream> #i
相关文章
相关标签/搜索