1151

【图论】【寻找性质】CF1151E Number of Components 题解

CF1151E 发现每一个 \(f(l, r)\) 中的连通块总是一条链(一棵树)。 那么此时连通块的数量就等于点的数量减去边的数量。 先考虑点的总数,一个价值为 \(a_i\) 的点一定是在 \(l \leqslant a_i\) 且 \(r\geqslant a_i\) 的 \(f(l, r)\ ......
题解 Components 性质 Number 1151E

HDU1151—Air Raid(最小路径覆盖)

## [【$HDU1151$】—$Air$ $Raid$(最小路径覆盖)](http://acm.hdu.edu.cn/showproblem.php?pid=1151) - 题解描述 给定一个$DAG$(有向无环图),选定最少的点,使得从这些点出发可以覆盖每一条路径(即每个点都经过至少一遍)。 * ......
路径 1151 Raid HDU Air

1151 LCA in a Binary Tree

题目: The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. Given any two nodes in a ......
Binary 1151 Tree LCA in
共3篇  :1/1页 首页上一页1下一页尾页