摘要: 题面 https://codeforces.com/contest/741/problem/D 题解 前置知识: DSU on tree:https://oi-wiki.org/graph/dsu-on-tree/ 首先,对题目中”一条路径上的字符,重排后能够构成回文串“这个条件做一下转化。 如果路 阅读全文
posted @ 2020-10-06 19:49 coder66 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题面 https://loj.ac/problem/3046 题解 前置知识: 线段树合并: https://www.luogu.com.cn/problemnew/solution/P4556 首先对求的值做一个转化:相当于对$1 \leq i \leq n$,求出$S[i]$表示1~n中可以与i 阅读全文
posted @ 2020-10-06 19:47 coder66 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题面 https://loj.ac/problem/2537 题解 前置知识: 线段树合并:https://www.luogu.com.cn/problemnew/solution/P4556 首先考虑朴素做法。设$f[u][i]$表示点u取到第i大的权值的概率,然后进行树上dp。但是这个dp最多优 阅读全文
posted @ 2020-10-06 12:25 coder66 阅读(206) 评论(0) 推荐(0) 编辑