图论:DFS及其应
文章平均质量分 83
Killerfear
这个作者很懒,什么都没留下…
展开
-
(beginer) DFS LA3486 Cells
1357 - CellsTime limit: 3.000 secondsScientists are conducting research on the behavior of a newly discovered Agamic Cellular Microbe. This special kind of microbe is capable of massively reproducin原创 2014-02-08 09:54:07 · 645 阅读 · 0 评论 -
(intermediate) DFS (高精度+找环) UVA 1361 Cactus
Cactus is a connected undirected graph in which every edge lies on at most one simple cycle. Intuitively cactus is a generalization of a tree where some cycles are allowed. Your task first is to ve原创 2014-02-08 09:54:23 · 839 阅读 · 0 评论 -
(beginer)DFS (双连通分量) UVA 10765 Doves and bombs
题意:给出一个图,一个点的“鸽子值”是删掉这个点后有多少个连通分量。求出每个点的鸽子值。思路:如果一个点不是割顶,那么连通分量还是1,如果是割顶,那么连通分量的数目就是包含这个割顶的双连通分量的个数。所以直接模板吧。代码:#include#include#include#include#include#include#includeusing namespace std;const int max原创 2014-02-08 09:54:09 · 494 阅读 · 0 评论 -
(intermediate)DFS (强连通+缩点+拓扑排序) UVA 11098 - Battle II
Problem EBattle II Time Limit: 6 seconds "Marriage, in life, is like a duel in themidst of the battle"Edmond AboutDaltons (Daida, Alhar, Tara, and Reyton) love playing games. One of their f原创 2014-02-08 09:54:30 · 685 阅读 · 0 评论 -
(intermediate)2-SAT UVA 11930 Rectangles
Rectangles Given a set of rectangles in the plane, determine if it is possible to choose one diagonal from each rectangle such that none of the selected diagonals intersect. Two diagonals原创 2014-02-24 20:02:07 · 746 阅读 · 0 评论 -
(intermediate) DFS的应用 UVA 12273 Palindromic DNA
A DNA sequence is composed of a series of four possible nucleobases, namely Adenine, Guanine, Thymine and Cytosine; we will refer to each of these bases by their initial. For our purposes, nucleobases原创 2014-02-24 17:46:39 · 747 阅读 · 0 评论 -
(beginer)DFS (桥...边-双连通分量) UVA 610 - Street Directions
Street Directions According to the Automobile Collision Monitor (ACM), most fatal traffic accidents occur on two-way streets. In order to reduce the number of fatalities caused by traffic accident原创 2014-02-08 09:54:20 · 942 阅读 · 0 评论 -
(intermediate) (边-双连通分量) UVA 1310 - One-way traffic
In a certain town there are n intersections connected by two- and one-way streets. The town is very modern so a lot of streets run through tunnels or viaducts. Of course it is possible to travel betwe原创 2014-02-24 10:01:10 · 1075 阅读 · 1 评论 -
(beginer)DFS (dfs) UVA 10319 Manhattan
Problem HManhattanInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MB You are the mayor of a city with severe traffic problems. To deal with the situation,原创 2014-02-08 09:54:14 · 659 阅读 · 0 评论 -
(beginer)DFS (2-SAT) UVA 11294 Wedding
Problem E: WeddingUp to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the brid原创 2014-02-08 09:54:11 · 717 阅读 · 0 评论 -
(intermediate)DFS (边-双连通) UVA 10972 RevolC FaeLoN
Problem IRevolC FaeLoNHopefully, you can remember Koorosh from one of the previous problems. Fortunately, Koorosh has solved Basm’s problem without your help! Now, he is a high-ranked advisor of B原创 2014-02-08 09:54:25 · 661 阅读 · 0 评论 -
(intermediate)DFS UVA 11604 General Sultan
General SultanInput: Standard InputOutput: Standard Output This is war time again! Our beloved Sultan has assumed the post of a general and going to the war with his huge army. Being an in原创 2014-02-08 09:54:27 · 875 阅读 · 0 评论 -
(beginer)DFS (强连通)UVA 11504 Dominos
Problem D: DominosDominos are lots of fun. Children like to stand the tiles on their side in long lines. When one domino falls, it knocks down the next one, which knocks down the one after that, all原创 2014-02-08 09:54:18 · 1757 阅读 · 0 评论 -
(beginer)DFS UVA 11396 Claw Decomposition
Claw DecompositionInput: Standard InputOutput: Standard Output A claw is defined as a pointed curved nail on the end of each toe in birds, some reptiles, and some mammals. However, if you ar原创 2014-02-08 09:54:04 · 612 阅读 · 0 评论 -
(beginer) DFS (二分图判定) UVA 11080 Place the Guards
Problem GPlace the GuardsInput: Standard InputOutput: Standard OutputIn the country of Ajabdesh there are some streets and junctions. Each street connects 2 junctions. The king of Ajabdesh wa原创 2014-02-08 09:54:16 · 1397 阅读 · 0 评论 -
BZOJ 1093: [ZJOI2007]最大半连通子图
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1093原创 2014-09-01 10:40:01 · 394 阅读 · 0 评论