SPOJ 10628. Count on a tree (LCA+主席树)
题意:给定一棵n个节点的树,有n-1条边;有m个询问,每个询问求出给出两个点路径上第k大的值
(N, M <= 100000)
Description
You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight.
We will ask ...
原创
2019-03-14 13:34:29 ·
2154 阅读 ·
0 评论