图论
A half moon
这个作者很懒,什么都没留下…
展开
-
二分图——(最大匹配,最小顶点覆盖两者相应例题--POJ1469 POJ1325 基础例题)
参考博客:(二分图的相关概念+匈牙利算法 简单清楚的介绍)https://blog.csdn.net/qq_41829060/article/details/92180709推荐博客《Hall定理(二分图匹配问题,Hungary算法基础)》:https://blog.csdn.net/Feynman1999/article/details/760376031、二分图...原创 2019-08-02 21:20:12 · 699 阅读 · 0 评论 -
拓扑排序+DP—— CodeForces - 919D Substring
拓扑排序在图论中,拓扑排序(TopologicalSorting)是一个有向无环图(DAG,DirectedAcyclicGraph)的所有顶点的线性序列。且该序列必须满足下面两个条件:1.每个顶点出现且只出现一次。2.若存在一条从顶点A到顶点B的路径,那么在序列中顶点A出现在顶点B的前面。拓扑排序通常用来“排序”具有依赖关系的任务。比如,如果用一个DAG图来表示一个工程,...原创 2019-08-02 21:37:32 · 528 阅读 · 0 评论 -
SPFA+差分约束——POJ1716( Integer Intervals )
An integer interval [a,b], a < b, is a set of all consecutive integers beginning with a and ending with b.Write a program that: finds the minimal number of elements in a set containing at least tw...原创 2019-07-31 21:11:22 · 119 阅读 · 0 评论 -
连通分量(求有几个连通分量+判断是否两点连通+是否为强联通图 相应例子)
参考博客:https://blog.csdn.net/jinzk123/article/details/52231527https://blog.csdn.net/qq_40998706/article/details/86697221 一 . DFS+标记(求连通分量个数)题目描述在无向图中,如果从顶点vi到顶点vj有路径,则称vi和vj连通。如果图中任意两个顶点之...原创 2019-08-01 21:31:17 · 4158 阅读 · 0 评论 -
唯一分解定理——POJ1365(把一个数表示成素数幂积)
Prime LandEverybody in the Prime Land is using a prime base number system. In this system, each positive integer x is represented as follows: Let {pi}i=0,1,2,... denote the increasing sequence of al...原创 2019-08-12 21:30:48 · 199 阅读 · 0 评论
分享