随笔分类 - 图论
摘要:链接:http://poj.org/problem?id=3020http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/MAntenna PlacementTime Limit:1000MSMemory Limit:65536KTotal Submissions:5500Accepted:2750DescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mo
阅读全文
摘要:链接:http://poj.org/problem?id=1125http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/EStockbroker GrapevineTime Limit:1000MSMemory Limit:10000KTotal Submissions:23440Accepted:12854DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method
阅读全文
摘要:链接:http://poj.org/problem?id=1860http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/ACurrency ExchangeTime Limit:1000MSMemory Limit:30000KTotal Submissions:16244Accepted:5656DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializ
阅读全文
摘要:链接:http://poj.org/problem?id=3259http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/BWormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:25079Accepted:8946DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is ve
阅读全文
摘要:链接:http://poj.org/problem?id=3026http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/JBorg MazeTime Limit:1000MSMemory Limit:65536KTotal Submissions:6905Accepted:2315DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Bor
阅读全文
摘要:链接:http://poj.org/problem?id=1789http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/GTruck HistoryTime Limit:2000MSMemory Limit:65536KTotal Submissions:14950Accepted:5714DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable deliv
阅读全文
摘要:链接:http://poj.org/problem?id=2485http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/HHighwaysTime Limit:1000MSMemory Limit:65536KTotal Submissions:18668Accepted:8648DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the tra
阅读全文
摘要:链接:http://poj.org/problem?id=2187http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22013#problem/EBeauty ContestTime Limit:3000MSMemory Limit:65536KTotal Submissions:24254Accepted:7403DescriptionBessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the
阅读全文
摘要:链接:http://poj.org/problem?id=2031http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22013#problem/ABuilding a Space StationTime Limit:1000MSMemory Limit:30000KTotal Submissions:3578Accepted:1830DescriptionYou are a member of the space station engineering team, and are assigned a task in the const
阅读全文
摘要:题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2361来源:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=26760#problem/BBeloved SonsTime Limit:2 Seconds Memory Limit:65536 KB Special JudgeOnce upon a time there lived a king and he had N sons. And the king wanted to marry his belo
阅读全文
摘要:查看资料:lrj 《算法竞赛入门经典》相关概念:最大流:(Maximum-Flow Problem) 从源点 S 中间经过一些点,一些的物品运送到汇点 t 。 中途每两点间都有个最大运送物品数。 求从 s 到 t 最多能运送多少物品。 容量: 对于一条边 (u,v),它的物品上限(能够运送的物品最大数量)称为容量 (capacity), 记为 c(u,v) (对于不存在的边 (u,v) , c(u,v) = 0)流量: 实际运送物品数称为流量 (flow) 规定:f(u,v) 和 f(v,u) 最多只有一个正数(可以均...
阅读全文
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=3549Flow ProblemTime Limit: 5000/5000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 5111Accepted Submission(s): 2385Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is t
阅读全文
摘要:HDU TodayTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9623Accepted Submission(s): 2297Problem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住了一段时间,徐总对当地的交通还是不
阅读全文
摘要:一个人的旅行Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12881Accepted Submission(s): 4364Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看
阅读全文
摘要:新队员图论基础背景:2013/05/05 去农大水了下蓝桥,估计是去了就有奖,吸引学生参赛,任然被虐!!! 2013/05/11 惨败于湘潭邀请赛。 最近一直纠结与考研还是工作,六级一直又没过,荒废了一段时间,今天就来新生这儿水一下找点做题的心情 吧。 无论是比赛还是平时训练,果断被12级的虐了Orz,努力不够+。。。IDOriginTitle4/7Problem AHDU 1232并查集3/4Problem BHDU 1856并查集1/3Problem CHDU 1874Floyd1/1Problem DHDU 2544Floyd || DijkstraProblem...
阅读全文
摘要:1526: 拣金豆Time Limit:1 SecMemory Limit:256 MBSubmit:20Solved:5SubmitStatusWeb BoardDescription最近小明非常喜欢玩捡金豆游戏。有一个n*m的方格棋盘,每一个格子中有一个金豆或者没有。如果两个相邻的格子都有一个金豆,则可以捡起金豆,这两个格子中就没有金豆了。如果两个格子的曼哈顿距离等于1,则表示两个格子相邻。游戏的目的尽可能捡最多的金豆。Input第一行输入是一个整数T,表示测试用例个数,每一个测试用例包含两个整数n,m(1
#include
#include
#include
using namespac
阅读全文
摘要:原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1233CSUST链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=19760#problem/D还是畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17151Accepted Submission(s): 7688Problem Description某省调查乡村交通状况,得到的
阅读全文
摘要:原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1232CSUST链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=19760#problem/C畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19633Accepted Submission(s): 10103Problem Description某省调查城镇交通状况,得到现有
阅读全文
摘要:PS:第一道并查集题目Orz链接:http://acm.hdu.edu.cn/showproblem.php?pid=1878CSUST链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=10462#problem/A欧拉回路Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7271Accepted Submission(s): 2548Problem Description欧拉回路是
阅读全文
摘要:【转自】http://www.cnblogs.com/cherish_yimi/archive/2009/10/11/1580839.html文章作者:yx_th000文章来源:Cherish_yimi(http://www.cnblogs.com/cherish_yimi/) 转载请注明,谢谢合作。 [本文新址:http://www.ahathinking.com/archives/10.html]昨天和今天学习了并查集和trie树,并练习了三道入门题目,理解更为深刻,觉得有必要总结一下,这其中的内容定义之类的是取自网络,操作的说明解释及程序的注释部分为个人理解。并查集学习:l并查集:(un
阅读全文

浙公网安备 33010602011771号