![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
差分
差分
Qingo呀
老菜鸡。
展开
-
洛谷 P3128 [USACO15DEC]最大流Max Flow (树上差分-点差)
题目描述 Farmer John has installed a new system of N−1N-1N−1 pipes to transport milk between the NNN stalls in his barn (2≤N≤50,0002 \leq N \leq 50,0002≤N≤50,000), conveniently numbered 1…N1 \ldots N1…N....原创 2019-07-04 17:16:54 · 130 阅读 · 0 评论 -
BZOJ3331: [BeiJing2013]压力(点双连通分量+缩点+LCA+树上差分)
链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3331 题意:n个点,m条无向边,给出q个点对,问这n个点分别是多少点对的必经点。(两点本身也算也算。) 思路:显然,如果两点在同一个点双中,那么他俩的必经点也就是他俩本身。否则,这两点的必经点也就是连接他俩点双的割点。我们将点双缩成一个点,割点视为一个点(一个割点可能属于若干个点双),然...原创 2019-08-18 21:06:27 · 453 阅读 · 0 评论 -
HDU - 5452 Minimum Cut (树上差分)
Given a simple unweighted graph G (an undirected graph containing no loops nor multiple edges) with n nodes and m edges. Let T be a spanning tree of G. We say that a cut in G respects T if it cuts jus...原创 2019-07-04 14:24:21 · 143 阅读 · 0 评论