摘要: A. The Doors time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. The Doors time limit per 阅读全文
posted @ 2019-03-31 11:30 yosoro 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 可以计算负权边的dijkstra //最小费用流Dijkstra算法 //Dijkstra算法求最小费用流核心代码: //h[MAX_V]:导入势保证所有边均为非负边 O(FElogV) int min_cost_flow(int n, int v, int s, int t, int f) { i 阅读全文
posted @ 2018-11-01 18:07 yosoro 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 洛谷【P3386】 题目背景 二分图 感谢@一扶苏一 提供的hack数据 题目描述 给定一个二分图,结点个数分别为n,m,边数为e,求二分图最大匹配数 输入输出格式 输入格式: 第一行,n,m,e 第二至e+1行,每行两个正整数u,v,表示u,v有一条连边 输出格式: 共一行,二分图最大匹配 输入输 阅读全文
posted @ 2018-10-14 16:21 yosoro 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 网络流的相关定义: 源点:有n个点,有m条有向边,有一个点很特殊,只出不进,叫做源点。 汇点:另一个点也很特殊,只进不出,叫做汇点。 容量和流量:每条有向边上有两个量,容量和流量,从i到j的容量通常用c[i,j]表示,流量则通常是f[i,j]. 通常可以把这些边想象成道路,流量就是这条道路的车流量, 阅读全文
posted @ 2018-05-25 13:39 yosoro 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by wa 阅读全文
posted @ 2018-05-25 13:36 yosoro 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Jzzhu is the president of country A. There are n cities numbered from 1 to n in his country. City 1 is the capital of A. Also there are m roads connec 阅读全文
posted @ 2018-05-24 23:56 yosoro 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Six Degrees of Cowvin Bacon Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6744 Accepted: 3139 Description The cows have been making movie 阅读全文
posted @ 2018-04-14 01:31 yosoro 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 58636 Accepted: 21921 Description While exploring his many farms, Farmer John has 阅读全文
posted @ 2018-04-14 01:25 yosoro 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Cow Hurdles Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8506 Accepted: 3751 Description Farmer John wants the cows to prepare for the c 阅读全文
posted @ 2018-04-14 01:18 yosoro 阅读(139) 评论(0) 推荐(0) 编辑
摘要: A. Pride time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Pride time limit per test 2 阅读全文
posted @ 2018-04-14 01:09 yosoro 阅读(108) 评论(0) 推荐(0) 编辑