*******图论*******
文章平均质量分 68
猿的进化之路
这个作者很懒,什么都没留下…
展开
-
hdu1599floyd_最短路
http://acm.hdu.edu.cn/showproblem.php?pid=1599find the mincost routeTime Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3358 Accepted S原创 2015-08-19 19:44:50 · 288 阅读 · 0 评论 -
poj3268最短路Dijkstrra
题目大意:给出n个点和m条边,接着是m条边,代表从牛a到牛b需要花费c时间,现在所有牛要到牛x那里去参加聚会,并且所有牛参加聚会后还要回来,给你牛x,除了牛x之外的牛,他们都有一个参加聚会并且回来的最短时间,从这些最短时间里找出一个最大值输出D - Silver Cow PartyTime Limit:2000MS Memory Limit:65536KB 64bi原创 2015-08-20 17:23:01 · 534 阅读 · 0 评论 -
hdu2063 二分图
http://acm.hdu.edu.cn/showproblem.php?pid=2063欢迎参加——每周六晚的BestCoder(有米!)过山车Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss原创 2015-08-24 11:31:11 · 336 阅读 · 0 评论 -
hdu1532网络流
Drainage DitchesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12550 Accepted Submission(s): 5975Problem DescriptionEvery ti原创 2015-08-22 19:38:48 · 338 阅读 · 0 评论 -
poj2253 最小生成树最大权
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 32122 Accepted: 10351DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Sudden原创 2016-01-04 17:04:54 · 473 阅读 · 0 评论 -
poj1797
Time Limit: 3000MS Memory Limit: 30000KTotal Submissions: 26357 Accepted: 7011DescriptionBackground Hugo Heavy is happy. After the breakdown of the Cargolifter project he原创 2016-01-04 19:07:35 · 483 阅读 · 0 评论 -
3268最短路问题
Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16272 Accepted: 7448DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently原创 2016-01-05 21:06:05 · 375 阅读 · 0 评论 -
poj3281 最大流
DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 12634 Accepted: 5801DescriptionCows are such finicky eaters. Each cow has a preference for certain原创 2016-01-23 16:32:01 · 242 阅读 · 0 评论 -
poj2195 spfa 最小费用最大流
Going HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20302 Accepted: 10296DescriptionOn a grid map there are n little men and n houses. In each uni原创 2016-01-23 16:37:02 · 297 阅读 · 0 评论 -
poj2135
Farm TourTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13920 Accepted: 5292DescriptionWhen FJ's friends visit him on the farm, he likes to show them a原创 2016-01-23 17:05:56 · 338 阅读 · 0 评论 -
poj3660
Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8765 Accepted: 4931DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participa原创 2016-01-06 21:46:33 · 768 阅读 · 0 评论 -
poj1502
MPI MaelstromTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7445 Accepted: 4533DescriptionBIT has recently taken delivery of their new supercomputer, a原创 2016-01-08 21:04:22 · 317 阅读 · 0 评论 -
poj2240
ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 18810 Accepted: 7962DescriptionArbitrage is the use of discrepancies in currency exchange rates原创 2016-01-08 21:10:41 · 324 阅读 · 0 评论 -
poj1511最短路 spfa
Invitation CardsTime Limit: 8000MS Memory Limit: 262144KTotal Submissions: 23260 Accepted: 7657DescriptionIn the age of television, not many people attend theater原创 2016-01-13 14:46:57 · 371 阅读 · 0 评论 -
图论训练1A,uva4255 拓扑排序
Given a sequence of integers, a1, a2,..., an , we define its sign matrix S such that, for 1ijn , Sij = `` + " if ai +...+ aj > 0 ; Sij = `` - " ifai +...+ aj ; and Sij = ``0" otherwise.For ex原创 2016-03-16 21:52:11 · 457 阅读 · 0 评论 -
hdu5040
InstrusiveTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1564 Accepted Submission(s): 465Problem DescriptionThe legendary mercenary Soli原创 2016-03-17 10:30:59 · 703 阅读 · 1 评论 -
查分约束uva
You are given a weighted directed graph with n vertices and m edges. Each cycle in the graph has aweight, which equals to sum of its edges. There are so many cycles in the graph with different weigh原创 2016-03-29 20:57:26 · 460 阅读 · 0 评论 -
单源最短路径+最小花费生成树
A - Road ConstructionTime Limit:8000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionKing Mercer is the king of ACM kingdom. There are one capital a原创 2016-03-29 21:09:20 · 1597 阅读 · 0 评论 -
hdu4786-图论训练3-最小生成树
D - Fibonacci TreeTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription Coach Pang is interested in Fibonacci numbers while Uncle Ya原创 2016-03-29 21:22:12 · 324 阅读 · 0 评论 -
poj3126 bfs
http://poj.org/problem?id=3126Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14460 Accepted: 8159DescriptionThe ministers of the原创 2015-09-23 16:23:04 · 329 阅读 · 0 评论 -
poj2438 哈密顿图
Children's DiningTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4429 Accepted: 637 Special JudgeDescriptionUsually children in kindergarten like to原创 2016-03-18 19:54:48 · 752 阅读 · 0 评论 -
欧拉回路模板
#include#includeconst int MAXN=111;using namespace std;stackS;int edge[MAXN][MAXN];int n,m;void dfs(int x){ S.push(x); for(int i=1;i<=n;i++){ if(edge[x][i]>0){ edg转载 2016-03-18 20:01:05 · 1032 阅读 · 0 评论 -
poj2253
B - FroggerTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2253DescriptionFreddy Frog is sitting on a stone in the middle原创 2016-03-19 09:16:28 · 374 阅读 · 0 评论 -
poj1734floyd——最小环+路径
给出一张无向图,求一个最小环并输出路径。说说我的感觉:包含点 i 和点 j 的最小环,我们可以看成是 i 到 j 之间的最短路和次短路的组合,通过 floyd 可求任意两点之间的最短距离,那么我们只要找到最短路径外的一条最短路来保证 i 和 j 之间可达即可。在做 floyd 循环的同时,我们以 环权值 最小(最短路权值+次短路权值=最小环权值)为标准,一直更新每个点的前驱,也就是记录 i 到转载 2015-08-20 16:49:17 · 596 阅读 · 0 评论 -
图论1E,cf405E
Little Chris is participating in a graph cutting contest. He's a pro. The time has come to test his skills to the fullest.Chris is given a simple undirected connected graph with n vertices (numbered原创 2016-03-19 10:20:43 · 332 阅读 · 0 评论 -
最小树形图uva11183
Problem ITeen Girl Squad Input: Standard Input Output: Standard Output You are part of a group of n teenage girls armed with cellphones. You have some news you want to tell everyone in the gro原创 2016-03-08 15:58:23 · 278 阅读 · 0 评论 -
hdu2255二分图最大权匹配
一体”全攻略! 招聘——巴卡斯科技(杭州)、英雄互娱(杭州)奔小康赚大钱Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6340 Accepted Submission(s): 2789原创 2016-03-08 21:11:14 · 451 阅读 · 0 评论 -
连通图hdu1045
A - Fire NetTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1045DescriptionSuppose that we have a square city with straight转载 2016-02-24 09:57:14 · 325 阅读 · 0 评论 -
hdu4292 网络流 —最大流
FoodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4364 Accepted Submission(s): 1475Problem Description You, a part-time di原创 2016-03-09 18:34:13 · 335 阅读 · 0 评论 -
poj3469最大流(最大割)
Dual Core CPUTime Limit: 15000MS Memory Limit: 131072KTotal Submissions: 22059 Accepted: 9587Case Time Limit: 5000MSDescriptionAs more and more computers ar原创 2016-03-10 09:41:02 · 412 阅读 · 0 评论 -
hdu5025
Saving Tang MonkTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1889 Accepted Submission(s): 671Problem Description《Journey t原创 2016-03-22 14:45:57 · 348 阅读 · 0 评论 -
hdu2616搜索
N - Find a wayTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2612DescriptionPass a year learning in Hangzhou, yifenfei arr原创 2016-03-10 21:29:54 · 271 阅读 · 0 评论 -
uva11624
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=65959#problem/J发个题目链接吧,文章复制不成功,就是给一个二维图,# . F J ,# 表示墙,.表示路,F表示火,J表示人,二者都是每次移动一格,(上下左右),F可能会有多个,问人是否可以走出来,只要走到边就算走出来了,解决,bfs搜索,队列实现原创 2016-03-11 14:31:22 · 482 阅读 · 0 评论 -
poj3984
K - 迷宫问题Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3984Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0,原创 2016-03-11 14:36:39 · 261 阅读 · 0 评论 -
图论训练2C——hdu5137
C - How Many Maos Does the Guanxi WorthTime Limit:1000MS Memory Limit:512000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription"Guanxi" is a very important word in Chi原创 2016-03-22 16:36:04 · 424 阅读 · 0 评论 -
hdu3829
B - Cat VS DogTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 3829DescriptionThe zoo have N cats and M dogs, today there are原创 2016-03-12 21:22:07 · 564 阅读 · 0 评论 -
poj1679次小生成树
A - The Unique MSTTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1679DescriptionGiven a connected undirected graph, tell原创 2016-02-28 12:46:27 · 323 阅读 · 0 评论 -
hdu3836
Equivalent SetsTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 104857/104857 K (Java/Others)Total Submission(s): 3751 Accepted Submission(s): 1308Problem DescriptionTo prov原创 2016-03-13 18:54:54 · 643 阅读 · 0 评论 -
hdu1281二分图匹配
D - 棋盘游戏Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1281Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们原创 2016-02-29 21:21:42 · 339 阅读 · 0 评论 -
hdu1083二分图匹配
C - CoursesTime Limit:10000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1083DescriptionConsider a group of N students and P courses. Ea原创 2016-02-29 21:24:14 · 324 阅读 · 0 评论