Codeforces 1084A - The Fair Nut and the Best Path - 树形DP题解链接https://lucien.ink题目链接https://codeforces.com/contest/1084/problem/D题意 给你一棵树,数上的每个点都有一个正权值,每条边都有一个负权值,让你在树中找一条简单路径,使得权值和最大。思路&e...
Codeforces 1082F - Speed Dial - 动态规划题解链接https://lucien.ink题目链接https://codeforces.com/contest/1082/problem/F题目Polycarp's phone book contains $n$ phone numbers, each of them is described by $s_i$ — t...