上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 97 下一页
摘要: 【实现类】 const int MAXSIZE=100;templateclass cirQueue{public: cirQueue(); ~cirQueue(); void push(T x);//入队 T pop();//出队 ... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(10) 评论(0) 推荐(0)
摘要: 【概述】 队列(Queue)是一种特殊的线性表,是只能在一端插入在另一端删除的特殊线性表。它按照先进先出的原则存储数据,先进入的数据被压入队首,最后的数据在队尾。 由于队列满足先进先出,后进后出的性质,因此也被称为先进先出表(FIFO)或后进后出表(LILO)... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(72) 评论(0) 推荐(0)
摘要: 【概述】 EK 算法是每次用广搜寻找一条最短的增广路,然后沿其增广,而 MCMF 算法是在 EK 算法的基础上,每次用 SPFA 计算图的距离标号,然后沿着可行边进行增广,即将 EK 算法中的 bfs 替换为 SPFA 求最短路,边权为该边的单位流量花费,即改... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(105) 评论(0) 推荐(0)
摘要: 【概述】 EK 算法直接进行增广,而 Dinic 则是每次进行 bfs 求出层次图再 dfs 沿着层次图进行多路增广。 然而,Dinic 中每次进行 bfs 求层次图有些浪费,因为层次图的改动并不是很大,在这种思路下,因此考虑直接在每次 dfs 增广的时候修改... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(78) 评论(0) 推荐(0)
摘要: 【概述】 Dinic 算法在 EK 算法的基础上进行了优化,其时间复杂度为 O(n*n*m)。 Dinic 在找增广路的时也是找最短增广路, 但与 EK 算法不同的是 Dinic 算法并不是每次 bfs 只找一个增广路,他会首先通过一次 bfs 为所有点添加一... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(370) 评论(0) 推荐(0)
摘要: 【概述】 FF 算法与 EK 算法是求解最大流的一般增广路方法,其时间复杂度均为 O(n*m*m) Ford-Fulkerson 算法是求解最大流的最基础的算法,其核心思想是增广路定理:网络达到最大流当且仅当残留网络中没有增广路 程序的实现过程与增广路求最大流... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(158) 评论(0) 推荐(0)
摘要: Problem Description For some years, quite a lot of work has been put into listening to electromagnetic radio signals received f... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(13) 评论(0) 推荐(0)
摘要: Problem Description The widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(12) 评论(0) 推荐(0)
摘要: Problem Description Our bear's forest has a checkered field. The checkered field is an n × n table, the rows are numbered from ... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(10) 评论(0) 推荐(0)
摘要: Problem Description The cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (proper... 阅读全文
posted @ 2022-09-20 22:56 老程序员111 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 97 下一页