图论
文章平均质量分 79
DevinFan
这个作者很懒,什么都没留下…
展开
-
HDU - 1240 Asteroids!
DescriptionYou're in space. You want to get home. There are asteroids. You don't want to hit them. InputInput to this problem will consist of a (non-empty) series of up to原创 2015-01-28 13:45:46 · 336 阅读 · 0 评论 -
HDU 2181 哈密顿绕行世界问题(DFS)
Description一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m=1.m=0退出. Output输出从第m个城市出发经过每个城市1次又回到原创 2015-03-26 19:04:30 · 685 阅读 · 0 评论 -
POJ 3669Meteor Shower(广搜)
DescriptionBessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit. Anxious for her safety, she vows to fin原创 2015-03-26 18:59:00 · 493 阅读 · 0 评论 -
LightOJ - 1019 Brush (V)
DescriptionTanvir returned home from the contest and got angry after seeing his room dusty. Who likes to see a dusty room after a brain storming programming contest? After checking a bit he found原创 2015-02-02 15:07:42 · 531 阅读 · 0 评论 -
LightOJ - 1111 Best Picnic Ever
DescriptionK people are having a picnic. They are initially in N cities, conveniently numbered from 1 to N. The roads between cities are connected by M one-way roads (no road connects a city to原创 2015-02-05 16:52:29 · 892 阅读 · 0 评论 -
LightOJ - 1281 New Traffic System
DescriptionThe country - Ajobdesh has a lot of problems in traffic system. As the Govt. is very clever (!), they made a plan to use only one way roads. Two cities s and t are the two most importan原创 2015-02-05 15:10:34 · 1052 阅读 · 0 评论 -
LightOJ - 1174 Commandos
DescriptionA group of commandos were assigned a critical task. They are to destroy an enemy head quarter. The enemy head quarter consists of several buildings and the buildings are connected by ro原创 2015-02-03 23:52:16 · 814 阅读 · 0 评论 -
最短路四种算法
题意,赤果果的最短路想当年傻傻地用floyd和dijkstra乱刷过,最近好好理解了一下最短路,今天用四种算法实现了一遍。以后可以当模板用。代码:floyd[cpp] view plaincopyprint?/* * Author: illuz * Blog: http:/转载 2015-02-02 12:53:00 · 664 阅读 · 0 评论 -
HDU - 1010 Tempter of the Bone
DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized原创 2015-01-15 20:34:50 · 366 阅读 · 0 评论 -
LightOJ - 1049 One Way Roads
DescriptionNowadays the one-way traffic is introduced all over the world in order to improve driving safety and reduce traffic jams. The government of Dhaka Division decided to keep up with new tr原创 2015-01-15 20:45:05 · 1056 阅读 · 0 评论 -
LightOJ - 1046 Rider
DescriptionA rider is a fantasy chess piece that can jump like a knight several times in a single move. A rider that can perform a maximum of K jumps during a single move is denoted as a K-rider.原创 2015-01-26 12:00:35 · 1128 阅读 · 0 评论 -
HDU - 1495 非常可乐(倒水问题BFS)
Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S Input三个整数 : S 可乐的体积 , N 和 M原创 2015-01-26 22:16:51 · 457 阅读 · 0 评论 -
HDU-1016 Prime Ring Problem
DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. No原创 2015-01-18 10:25:46 · 389 阅读 · 0 评论 -
LightOJ - ???? 最短修复路线(最小生成树)
DescriptionThere are several cities in the country, and some of them are connected by bidirectional roads. Unfortunately, some of the roads are damaged and cannot be used right now. Your goal is t原创 2015-01-29 15:19:48 · 518 阅读 · 0 评论 -
UVA-11624 Fire!
DescriptionJane is one of the most talented young programmers as well as an astrophysicist. Recently she discovered a planet and named it Jotunheim - the world of giants. As you already guessed th原创 2015-01-24 18:52:21 · 639 阅读 · 0 评论 -
POJ 3984 迷宫问题(BFS)
Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短原创 2015-03-26 21:36:28 · 436 阅读 · 0 评论