度度熊保护村庄 Accepts: 13 Submissions: 488 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 哗啦啦村袭击了喵哈哈村! 度度熊为了拯救喵哈哈村,带着自己的伙伴去救援喵哈哈村去了!度度熊与伙伴们很快的就过来占据了喵哈哈村的各个军事要地,牢牢的守住了喵哈哈村. 但是度度熊发现,这是一场旷日持久的战斗,所以度度熊决定要以逸…
Fence Loops The fences that surround Farmer Brown's collection of pastures have gotten out of control. They are made up of straight segments from 1 through 200 feet long that join together only at their endpoints though sometimes more than two fences…
Sightseeing trip Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6647 Accepted: 2538 Special Judge Description There is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attra…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1599 find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7047 Accepted Submission(s): 2736 Problem Description 杭州有N个景区,景区之间有一…
// 转自vijos题解 最小环问题<1>朴素的算法:令e(u,v)表示u和v之间的连边,再令min(u,v)表示,删除u和v之间的连边之后,u和v之间的最短路最小环则是min(u,v) + e(u,v),时间复杂度是EV2.<2>改进的方法:在floyd的同时,顺便算出最小环g[i][j]=(i,j之间的边长)dist:=g;for k:=1 to n dobeginfor i:=1 to k-1 dofor j:=i+1 to k-1 doanswer:=min(answer,…