摘要: Sample Input 5 4 2 1 5 3 3 1 4 3 2 2 4 3 2 Sample Output 1 Hint 题解 这道题目显然把每一段查询的路径求出来(即求LCA),然后将LCA排序,最后算一遍就行了 include include include include include 阅读全文
posted @ 2018-07-25 09:47 cj_gjh 阅读(108) 评论(0) 推荐(0) 编辑