摘要:
强连通缩点与双连通缩点大同小异,也就是说将强连通分支缩成一个点之后,没有强连通,成为有向无环图,在对图进行题目的操作。// Tarjan算法求有向图强连通分量并缩点#include#include#include... 阅读全文
摘要:
#include#include#includeusing namespace std;const int maxn=100010;int head[maxn],ver[maxn*2],Next[maxn*2];... 阅读全文
摘要:
// tarjan算法求无向图的割点、点双连通分量并缩点#include#include#include#include#includeusing namespace std;const int SIZE = 1... 阅读全文
摘要:
// tarjan算法求无向图的桥、边双连通分量并缩点#include#include#include#include#includeusing namespace std;const int SIZE = 10... 阅读全文
摘要:
疯子的算法总结(八) 最短路算法+模板 图论--(技巧)超级源点与超级汇点 最短路三大算法 最短路三大算法--Floyd —Warshall 最短路三大算法--Dijkstra 最短路三大算... 阅读全文
摘要:
SPFA算法(shortest path faster algorithm)算法是西南交通大学段凡丁于1994年发表的,它在Bellman-ford算法的基础上进行了改进,使其在能够处理待负权图的单元最短路径的基... 阅读全文
摘要:
#include#include#includeusing namespace std;const int maxn=100010;int head[maxn],ver[maxn*2],Next[maxn*2];... 阅读全文
摘要:
本博客参考了李煜东的《算法竞赛进阶指南》,大家要是觉得这篇文章写的不错请大家支持正版。豆瓣图书我在之前的博客中讲解了搜索序时间戳,这次我们讲讲追溯值的概念。追溯值: 设subtree(x)表示搜索树中,以X... 阅读全文
摘要:
Treap Splay树 划分树 左偏树 线段树 树链剖分 动态树 主席树 Trie树 RMQ 二分查找 树状数组 滚动数组 逆序数 带权值的并查集 Chtholly Tree (珂朵莉树) ODT SBT算法 ... 阅读全文
摘要:
E. Ciel the CommanderNow Fox Ciel becomes a commander of Tree Land. Tree Land, like its name said, has n c... 阅读全文