1856E

【树上背包】CF1856E1 PermuTree (easy version) 题解

CF1856E1 发现题目的要求只需要相对的大小关系,考虑一个子树时,不妨令子树内部编号连续。类似于一个 dp,这样也可以更好地将信息由儿子转移到父亲。 设 \(u\) 的孩子为 \(v_1,v_2,\dots,v_k\)。由于每棵子树内的编号是连续的,令以 \(v_i\) 为根的子树的编号为 \( ......
题解 背包 PermuTree version 1856E

CodeForces 1856E1 PermuTree (easy version)

[洛谷传送门](https://www.luogu.com.cn/problem/CF1856E1 "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1856/E1 "CF 传送门") 考虑局部贪心,假设我们现在在 $u$,我们希 ......
CodeForces PermuTree version 1856E1 1856E

CodeForces 1856E2 PermuTree (hard version)

[洛谷传送门](https://www.luogu.com.cn/problem/CF1856E2 "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1856/E2 "CF 传送门") 考虑局部贪心,假设我们现在在 $u$,我们希 ......
CodeForces PermuTree version 1856E2 1856E

【题解】PermuTree (easy version) - Codeforces 1856E1

**链接:** https://codeforces.com/contest/1856/problem/E1 **题目大意:** 给定一棵以节点 $1$ 为根的树,树的大小不超过 $n(1\leq n\leq 5000)$ ,给树的节点赋各不相同的权值(可以简化为某个 $[1,n]$ 的排列),使得 ......
题解 Codeforces PermuTree version 1856E1
共4篇  :1/1页 首页上一页1下一页尾页