摘要: 题目传送门:https://ac.nowcoder.com/acm/contest/33188/A 题意: • 给出两棵编号 1-n 的树 A B , A B 树上每个节点均有一个权值,给出 k 个关键点的编号,问有多 少种方案使得去掉恰好一个关键点使得剩余关键点在树 A 上 LCA 的权值大于树 阅读全文
posted @ 2022-07-26 18:17 Keyzee 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://www.luogu.com.cn/problem/P3379 倍增LCA模板: 1 #include<iostream> 2 #include<cstdio> 3 #include<algorithm> 4 #include<vector> 5 #include<map> 阅读全文
posted @ 2022-07-26 11:25 Keyzee 阅读(38) 评论(0) 推荐(0) 编辑