图论
荷塘涟漪
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【最小生成树】poj1258
Agri-NetDescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farm原创 2014-02-05 21:53:25 · 462 阅读 · 0 评论 -
【神奇的矩阵乘法】fzu2173
NostopDescriptionM国有N个城市,H条单向的道路,AekdyCoin从编号为1的城市出发,每经过一条道路要花一个单位的时间。假设他出发的时刻为0,他需要在K时刻到达编号为N的城市。并且,AekdyCoin不会在一个城市停留,每到一个城市他要立刻往下一个城市出发,最后在K时刻时他必须在城市N。虽然AekdyCoin经过任意一条道路的花费的时间都是1原创 2014-08-22 15:21:30 · 511 阅读 · 0 评论 -
【bellman_ford】poj3259
WormholesDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its de原创 2014-02-17 23:43:00 · 382 阅读 · 0 评论 -
【spfa(栈)||堆优dijkstra】poj3159
CandiesDescriptionDuring the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymous原创 2014-02-17 23:39:15 · 324 阅读 · 0 评论 -
【floyd】poj3660
Cow ContestDescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain cons原创 2014-02-18 00:31:35 · 389 阅读 · 0 评论 -
【bellman_ford】poj2240
ArbitrageDescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1原创 2014-02-17 23:29:21 · 221 阅读 · 0 评论 -
【SPFA】poj1511
Invitation CardsDescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, mos原创 2014-02-17 01:14:33 · 456 阅读 · 0 评论 -
【floyd+枚举】poj1178
CamelotDescriptionCenturies ago, King Arthur and the Knights of the Round Table used to meet every year on New Year's Day to celebrate their fellowship. In remembrance of these events, we consid原创 2014-02-27 19:51:26 · 590 阅读 · 0 评论 -
【dijkstra】poj1797
Heavy TransportationDescriptionBackground Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether ther原创 2014-02-17 01:22:33 · 275 阅读 · 0 评论 -
【SPFA】poj1502
MPI MaelstromDescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. V原创 2014-02-17 01:00:54 · 416 阅读 · 0 评论 -
【SPFA】poj2387
Til the Cows Come HomeDescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs原创 2014-02-17 01:06:22 · 438 阅读 · 0 评论 -
【floyd】poj1125
Stockbroker GrapevineDescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your emp原创 2014-02-17 00:48:39 · 376 阅读 · 0 评论 -
【二分图最大匹配】poj2239
Selecting CoursesDescriptionIt is well known that it is not easy to select courses in the college, for there is usually conflict among the time of the courses. Li Ming is a student who loves stu原创 2014-02-24 14:02:11 · 495 阅读 · 0 评论 -
【二分图最大匹配】poj3041
AsteroidsDescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 Fortunately, Bessie has a powerful weapon that can vaporize all原创 2014-02-24 13:50:20 · 554 阅读 · 0 评论 -
【二分图最大匹配】poj2446
ChessboardDescriptionAlice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2 to cover the board. However,原创 2014-02-24 13:43:15 · 478 阅读 · 0 评论 -
【最长链】wikioi1814
最长链 现给出一棵N个结点二叉树,问这棵二叉树中最长链的长度为多少,保证了1号结点为二叉树的根。输入描述输入的第1行为包含了一个正整数N,为这棵二叉树的结点数,结点标号由1至N。接下来N行,这N行中的第i行包含两个正整数l[i], r[i],表示了结点i的左儿子与右儿子编号。如果l[i]为0,表示结点i没有左儿子,同样地,如果r[i]为0则表示没有右儿子原创 2014-02-05 22:53:46 · 276 阅读 · 0 评论 -
【prim】wikioi1003
1003 电话连线 题目描述 Description一个国家有n个城市。若干个城市之间有电话线连接,现在要增加m条电话线(电话线当然是双向的了),使得任意两个城市之间都直接或间接经过其他城市有电话线连接,你的程序应该能够找出最小费用及其一种连接方案。输入描述 Input Description输入文件的第一行是n的值(n第二行至第n+1行是一个n原创 2014-02-05 21:59:34 · 620 阅读 · 0 评论 -
【kruskal+最小偏心距】wiki1700
施工方案第二季 c国边防军在边境某处的阵地是由n个地堡组成的。工兵连受命来到阵地要进行两期施工。第一期的任务是挖掘暗道让所有地堡互联互通。现已勘测设计了m条互不相交的暗道挖掘方案,如果这m条暗道都实施挖掘,肯定能达到互联互通的目的。事实上,适当选择其中n-1个方案挖掘,就能实现互联互通,即从每个地堡出发都能到达其他任何一个地堡(允许经过别的地堡)。连长精心谋算,在m个设原创 2014-02-05 22:48:14 · 305 阅读 · 0 评论 -
【BFS+priority_queue】hdu 4198
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4198题目大意: 给你一张地图,”S“为起点,"#"不能走,走过一个"."需要1个单位时间, 走过一个”@“需要d+1的单位时间,求中起点走出地图的最短时间……思路:我的第一反应是拆点……把一个“@”拆成d+1个,然后BFS但是这么写真的好麻烦啊!可以用优先队列+BFS,先扩展路径长度比较短原创 2015-02-13 14:56:20 · 370 阅读 · 0 评论
分享