摘要: 题目链接:[http://codeforces.com/problemset/problem/321/C](http://codeforces.com/problemset/problem/321/C) 解题思路: 点分治模板题。 每次找到重心给他分配一个字符,分治往下走的时候分配的字符ASCII码 阅读全文
posted @ 2023-06-25 19:58 quanjun 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 题目链接:[https://www.luogu.com.cn/problem/P4178](https://www.luogu.com.cn/problem/P4178) 解题思路: 点分治模板题。 设当前重心为 $u$,一共有三种不同类型的路径: 1. 路径的一个端点恰好是重心 $u$; 2. 路 阅读全文
posted @ 2023-06-25 19:35 quanjun 阅读(16) 评论(0) 推荐(0) 编辑