随笔分类 -  图论

1 2 下一页

HDU 3472 HS BDC (混合图的欧拉路径判断)
摘要:HS BDCTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 748Accepted Submission(s): 290Problem DescriptionIELTS is around the corner! love8909 has registered for the exam, but he still hasn’t got prepared. Now he decides to take actions. But when he t 阅读全文

posted @ 2014-02-03 16:58 kuangbin 阅读(1243) 评论(0) 推荐(0)

POJ 1386 Play on Words (有向图欧拉路径判定)
摘要:Play on WordsTime Limit:1000MSMemory Limit:10000KTotal Submissions:8768Accepted:3065DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important 阅读全文

posted @ 2014-02-03 14:41 kuangbin 阅读(725) 评论(0) 推荐(0)

POJ 2337 Catenyms (有向图欧拉路径,求字典序最小的解)
摘要:CatenymsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8756Accepted:2306DescriptionA catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second. For example, the following are catenyms:dog.gophergopher.ratrat.tiger 阅读全文

posted @ 2014-02-03 13:51 kuangbin 阅读(2792) 评论(0) 推荐(0)

POJ 1637 Sightseeing tour (混合图欧拉路判定)
摘要:Sightseeing tourTime Limit:1000MSMemory Limit:10000KTotal Submissions:6986Accepted:2901DescriptionThe city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that tourists can see every corner of the beautiful city. They want to construct the tour so that every street i 阅读全文

posted @ 2014-02-03 12:41 kuangbin 阅读(3537) 评论(2) 推荐(0)

SGU 101 Domino (输出欧拉路径)
摘要:101. Dominotime limit per test: 0.25 sec.memory limit per test: 4096 KBDominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of dots, or pips, on its face. The blocks usually are called bones, dominoes, or pieces and sometimes men, stones, or ev 阅读全文

posted @ 2014-02-03 11:18 kuangbin 阅读(1236) 评论(0) 推荐(0)

POJ 3422 Kaka's Matrix Travels(费用流)
摘要:Kaka's Matrix TravelsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6792Accepted:2679DescriptionOn anN×Nchessboard with a non-negative number in each grid, Kaka starts his matrix travels withSUM= 0. For each travel, Kaka moves one rook from the left-upper grid to the right-bottom one 阅读全文

posted @ 2013-08-04 10:40 kuangbin 阅读(1171) 评论(0) 推荐(0)

【转】一些图论、网络流入门题总结、汇总
摘要:最短路问题此类问题类型不多,变形较少POJ 2449 Remmarguts' Date(中等)http://acm.pku.edu.cn/JudgeOnline/problem?id=2449题意:经典问题:K短路解法:dijkstra+A*(rec),方法很多相关:http://acm.pku.edu.cn/JudgeOnline/showcontest?contest_id=1144该题亦放在搜索推荐题中POJ 3013 - Big Christmas Tree(基础)http://acm.pku.edu.cn/JudgeOnline/problem?id=3013题意:最简单最短 阅读全文

posted @ 2013-07-31 17:59 kuangbin 阅读(15661) 评论(3) 推荐(10)

HDU 4305 Lightning(计算几何,判断点在线段上,生成树计数)
摘要:LightningTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1099Accepted Submission(s): 363Problem DescriptionThere are N robots standing on the ground (Don't know why. Don't know how).Suddenly the sky turns into gray, and lightning storm come 阅读全文

posted @ 2013-07-27 16:28 kuangbin 阅读(1448) 评论(0) 推荐(0)

【转】有向图强连通分量的Tarjan算法
摘要:原文地址:https://www.byvoid.com/blog/scc-tarjan/[有向图强连通分量]在有向图G中,如果两个顶点间至少存在一条路径,称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。非强连通图有向图的极大强连通子图,称为强连通分量(strongly connected components)。下图中,子图{1,2,3,4}为一个强连通分量,因为顶点1,2,3,4两两可达。{5},{6}也分别是两个强连通分量。直接根据定义,用双向遍历取交集的方法求强连通分量,时间复杂度为O(N^2+M)。更好的方法是Kosara 阅读全文

posted @ 2013-07-07 16:07 kuangbin 阅读(2735) 评论(0) 推荐(1)

HDU 3072 Intelligence System (强连通分量)
摘要:Intelligence SystemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 982Accepted Submission(s): 440Problem DescriptionAfter a day, ALPCs finally complete their ultimate intelligence system, the purpose of it is of course for ACM ... ...Now, kzc_tc, t 阅读全文

posted @ 2013-07-06 23:34 kuangbin 阅读(753) 评论(0) 推荐(0)

UVA 10054 The Necklace(欧拉回路,打印路径)
摘要:题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=995Problem D: The NecklaceMy little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point. The figure be 阅读全文

posted @ 2013-06-22 13:47 kuangbin 阅读(815) 评论(0) 推荐(0)

UVA 11624 - Fire! (简单图论基础)
摘要:Problem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.Given Joe's location in the maze and which squares of the maze are on fire, you must determine whether Joe can 阅读全文

posted @ 2013-05-23 20:11 kuangbin 阅读(3985) 评论(0) 推荐(0)

HDU 4408 Minimum Spanning Tree 第37届ACM/ICPC 金华赛区网络赛1009 题 (最小生成树计数)
摘要:Minimum Spanning TreeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 205Accepted Submission(s): 65Problem DescriptionXXX is very interested in algorithm. After learning the Prim algorithm and Kruskal algorithm of minimum spanning tree, XXX finds th 阅读全文

posted @ 2012-09-22 21:20 kuangbin 阅读(2003) 评论(0) 推荐(0)

POJ 1847 Tram(最短路)
摘要:TramTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 7180Accepted: 2601DescriptionTram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the intersection. When the t 阅读全文

posted @ 2012-08-19 14:54 kuangbin 阅读(826) 评论(0) 推荐(0)

POJ 1511 Invitation Cards(最短路)
摘要:Invitation CardsTime Limit: 8000MSMemory Limit: 262144KTotal Submissions: 14556Accepted: 4710DescriptionIn 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, most of all, Antique Comedies. T 阅读全文

posted @ 2012-08-18 20:57 kuangbin 阅读(478) 评论(0) 推荐(0)

POJ 2240 Arbitrage(求正环)
摘要:ArbitrageTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11008Accepted: 4629DescriptionArbitrage 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 US Dollar buys 0.5 British po 阅读全文

posted @ 2012-08-18 19:39 kuangbin 阅读(585) 评论(0) 推荐(0)

POJ 1125 Stockbroker Grapevine(任意两点的最短路,FLoyed 算法)
摘要:Stockbroker GrapevineTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 21124Accepted: 11474DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in th 阅读全文

posted @ 2012-08-18 18:50 kuangbin 阅读(414) 评论(0) 推荐(0)

POJ 2253 Frogger(最短路的变形)
摘要:FroggerTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 17842Accepted: 5818DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sunsc 阅读全文

posted @ 2012-08-18 17:13 kuangbin 阅读(771) 评论(0) 推荐(0)

POJ 1062 昂贵的聘礼(最短路Dijkstra)
摘要:昂贵的聘礼Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 27365Accepted: 7639Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东 阅读全文

posted @ 2012-08-18 01:45 kuangbin 阅读(612) 评论(0) 推荐(0)

POJ 3255 Wormholes(最短路最负环)
摘要:WormholesTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 20639Accepted: 7342DescriptionWhile 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 destination at a time that is BE 阅读全文

posted @ 2012-08-18 00:05 kuangbin 阅读(776) 评论(0) 推荐(0)

1 2 下一页

导航

JAVASCRIPT: