Codeforces - 1098A - Sum in the tree
地址https://codeforces.com/contest/1098/problem/A原文地址https://www.lucien.ink/archives/400/题意给出一棵有点权的树,跟节点深度为 $1$ ,现在你只知道深度为奇数的点到数根的路经权值和,让你给所有点都分配一个非负的权值,满足所给和,且所有点权的和最小。如果不存在输出 $-1$ 。题解对于权值和未知的节点,让他们...
地址https://codeforces.com/contest/1098/problem/A原文地址https://www.lucien.ink/archives/400/题意给出一棵有点权的树,跟节点深度为 $1$ ,现在你只知道深度为奇数的点到数根的路经权值和,让你给所有点都分配一个非负的权值,满足所给和,且所有点权的和最小。如果不存在输出 $-1$ 。题解对于权值和未知的节点,让他们...
Codeforces 1076D - Edge Deletion - 思维题解链接https://lucien.ink题目链接http://codeforces.com/contest/1076/problem/D题意有一个 $n$ 个点 $m$ 条边的无向图 $G<n, m>$,定义 $dist(i)$ 为从 $1$ 号点出发到 $i$ 号点的最短路。你最多可以保留 $k$ 条...
Codeforces 1088E - Ehab and a component choosing problem题解链接https://lucien.ink题目链接https://codeforces.com/contest/1088/problem/E题目You're given a tree consisting of $n$ nodes. Every node $u$ has a we...
Codeforces 1082D - Maximum Diameter Graph - 贪心题解链接https://lucien.ink题目链接https://codeforces.com/contest/1082/problem/D题目Graph constructive problems are back! This time the graph you are asked to bui...
Codeforces 1082B - Vova and Trophies题解链接https://lucien.ink题目链接https://codeforces.com/contest/1082/problem/B题目 Vova has won $n$ trophies in different competitions. Each trophy is either g...