算法_图论
文章平均质量分 79
NJUTONY
吉林大学09级软件学院南京大学计算机研究生在读
展开
-
joj1185 Knight Moves
1185 : Knight MovesResultTIME LimitMEMORY LimitRun TimesAC TimesJUDGE1s8192K620289Standard<br /> A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each squ原创 2010-11-13 23:16:00 · 462 阅读 · 0 评论 -
poj1659 Frogs' Neighborhood(Havel-Hakimi定理)
Frogs' NeighborhoodTime Limit: 5000MS Memory Limit: 10000KTotal Submissions: 3471 Accepted: 1478 Special Judge<br />Description<br />未名湖附近共有N个大小湖泊L1, L2, ..., Ln(其中包括未名湖),每个湖泊Li里住着一只青蛙Fi(1 ≤ i ≤ N)。如果湖泊Li和Lj之间有水路相连,则青蛙Fi和Fj互称为邻居。现在已知每只青蛙的邻居数目x1, x2, ..., x原创 2011-05-27 09:34:00 · 693 阅读 · 0 评论 -
hdu 2066一个人的旅行 Dijkstra算法应用
Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看雪景,去巴黎喝咖啡写信,去北京探望孟姜女……眼看寒假就快到了,这么一大段时间,可不能浪费啊,一定要给自己好好的放个假,可是也不能荒废了训练啊,所以草儿决定在要在最短的时间去一个自己想去的地方原创 2011-03-11 12:43:00 · 900 阅读 · 0 评论 -
hdu2544最短路 Dijkstra 算法求最短路
<br />题目见之前的文章<br />这是Dijkstra算法的解法<br />#include<stdio.h> #define maxsum 0x7fffffff int map[101][101],dist[101],s[101]; void Dijkstra(int n,int x) { int mindis,u; for(int i=1;i<=n;i++) { dist[i]=map[x][i]; s[i]=0;原创 2011-03-06 15:23:00 · 864 阅读 · 0 评论 -
hdu 1162Eddy's picture Prime算法求最小生成树
Eddy's picture<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 2153 Accepted Submission(s): 1023<br /><br />Problem DescriptionEddy begins to like painting pictures recently ,he is sure原创 2011-03-05 18:19:00 · 800 阅读 · 0 评论 -
hdu2544最短路 Floyd求最短路
最短路<br />Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 5440 Accepted Submission(s): 2349<br /><br />Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累原创 2011-03-06 14:44:00 · 993 阅读 · 0 评论 -
hdu1301 Jungle Roads(Prime算法求最小生成树)
Jungle Roads<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 1555 Accepted Submission(s): 1129<br /><br />Problem Description<br />The Head Elder of the tropical island of Lagrishan has原创 2011-03-05 21:56:00 · 793 阅读 · 0 评论 -
hdu1690Bus System(Floyd 算法求最短路)
Bus System<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 2159 Accepted Submission(s): 553<br /><br />Problem DescriptionBecause of the huge population of China, public transportation i原创 2011-03-06 13:56:00 · 674 阅读 · 0 评论 -
hdu1102Constructing Roads(Prime 算法求最小生成树)
Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4644 Accepted Submission(s): 1615Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some原创 2011-03-05 17:15:00 · 675 阅读 · 0 评论 -
hdu1233还是畅通工程
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8576 Accepted Submission(s): 3921Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)原创 2011-03-03 22:23:00 · 486 阅读 · 0 评论 -
joj1198Risk (Floyd 最短路径)
1198 : RiskResultTIME LimitMEMORY LimitRun TimesAC TimesJUDGE3s8192K467246Standard<br /> Risk is a board game in which several opposing players attempt to conquer the world. The gameboard consists of a world map broken up into hypothetical countries.原创 2010-11-12 08:00:00 · 470 阅读 · 0 评论 -
joj2436 Next Generation Network
2436 : Next Generation NetworkResultTIME LimitMEMORY LimitRun TimesAC TimesJUDGE5s32768K1218158Standard<br />There are many citys in island A. In the old days, they communicate with each other using telephone. A telephone line connect two citys. There原创 2010-11-13 23:20:00 · 519 阅读 · 0 评论 -
zoj1395DoorMan (判断是否存在欧拉回路和通路)
Door Man Time Limit: 1 Second Memory Limit: 32768 KB原创 2011-07-05 14:00:32 · 600 阅读 · 0 评论