图论
高自期许
华为前员工,现武大在读硕。欢迎大家找我交流
展开
-
HDUOJ 1874 畅通工程续(FLOYD)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1874solution:用最简单floyd算法可解#include <bits/stdc++.h>using namespace std;int graph[200][200];int main(){ int n, m, a, b, c; while (cin >...原创 2019-09-28 17:21:42 · 90 阅读 · 0 评论 -
HDUOJ 2768 Cat vs. Dog(二分图)
Cat vs. DogTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2997 Accepted Submission(s): 1176Problem DescriptionThe latest reality show ha...原创 2019-10-10 11:00:16 · 73 阅读 · 0 评论 -
HDUOJ 2063 过山车(二分图最大匹配)
过山车Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36246 Accepted Submission(s): 15404Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求...原创 2019-10-07 17:45:23 · 110 阅读 · 0 评论 -
POJ 1274 The Perfect Stall(二分图最大匹配)
题目链接:http://poj.org/problem?id=1274solution:二分图最大匹配、匈牙利算法#include <iostream>#include <cstring>using namespace std;int match[201], n, m;bool vis[201], graph[201][201];bool found(i...原创 2019-10-01 20:38:49 · 90 阅读 · 0 评论 -
AizuOJ GRL_6_A Maximum Flow (最大流)
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_6_A题意:求最大流solution:#include <bits/stdc++.h>using namespace std;struct edge{ int to, w, p;};vector<edge> x[110];...原创 2019-10-01 15:20:01 · 137 阅读 · 0 评论 -
AizuOJ GRL_7_A Bipartite Matching(二分图最大匹配)
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_7_A题目大意:给出二分图、找出最大匹配数solution:匈牙利算法#include <bits/stdc++.h>using namespace std;int match[1001], v;bool vis[1001];vector...原创 2019-10-01 12:28:34 · 201 阅读 · 0 评论 -
HDUOJ 1863 畅通工程 (Kruskal)
畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46413 Accepted Submission(s): 20735Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交...原创 2019-09-29 16:31:33 · 84 阅读 · 0 评论 -
HDUOJ 3790 最短路径问题(SPFA)
最短路径问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 44472 Accepted Submission(s): 12760Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点...原创 2019-09-28 20:56:37 · 111 阅读 · 0 评论 -
HDUOJ 2544 最短路(Dijkstra)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544solution:造一个dijstra模板题#include <bits/stdc++.h>using namespace std;bool book[110];int n, graph[110][110], dis[110];void dijkstra(){ di...原创 2019-09-28 18:44:54 · 191 阅读 · 0 评论 -
HDUOJ 3549 Flow Problem(最大流)
Flow ProblemTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 28859 Accepted Submission(s): 12744Problem DescriptionNetwork flow is a well-...原创 2019-10-10 12:06:51 · 87 阅读 · 0 评论