![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
nucleare
这个作者很懒,什么都没留下…
展开
-
Build Tree HDU - 6533
http://acm.hdu.edu.cn/showproblem.php?pid=6533题目描述构建一个m层的满n叉树,所有的边都有权值。每条边的权值从k个数里面选,每个数只能被选一次0是根节点。di表示根节点到i点的距离,我们的目标是使得每个点到根节点的和最小。答案可能很大,请输出取模p后的答案输入输入包含两行第一行四个数,k,m,n,p (2<=k<=2e5 , 2<=p<=1e15)第二行包含k个数,保证k大于等于边数m,k个数每个.原创 2021-04-30 19:25:37 · 245 阅读 · 1 评论 -
Jamie's Contact Groups POJ - 2289 (二分多重匹配)
Jamie's Contact Groups POJ - 2289 Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The contact list has become so long t...原创 2019-01-20 15:47:02 · 584 阅读 · 0 评论 -
Network UVA - 315 (tarjan+割点)
NetworkUVA - 315A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N. No two places have the same num...原创 2019-03-11 17:28:19 · 160 阅读 · 0 评论 -
Critical Links UVA - 796 (tarjan+割边)
Critical LinksUVA - 796In a computer network a link L, which interconnects two servers, is considered critical if there are at least two servers A and B such that all network interconnection pat...原创 2019-03-12 17:20:41 · 165 阅读 · 0 评论 -
Cat VS Dog HDU - 3829
Cat VS Dog HDU - 3829 The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, then his/...原创 2019-01-20 13:54:26 · 234 阅读 · 0 评论 -
Air Raid HDU - 1151(最小路径覆盖)
Air Raid HDU - 1151Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through...原创 2019-01-19 13:35:28 · 173 阅读 · 0 评论 -
Antenna Placement POJ - 3020 (最小路径覆盖 = 节点数 - 最大匹配)
Antenna Placement POJ - 3020 The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the...原创 2019-01-18 12:30:51 · 159 阅读 · 2 评论 -
Heavy Transportation POJ1797
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cust...原创 2018-05-21 20:48:14 · 115 阅读 · 0 评论 -
最短路径问题 (图论入门+dijkstra(单源最短路))
给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t;起点s,终点。n和m为0时输入结束。 (1<n<=1000, 0<m<10...原创 2018-05-16 20:25:21 · 243 阅读 · 0 评论 -
Network( POJ - 1144 )(割点)
A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same number. The lines are...原创 2018-06-07 21:13:39 · 299 阅读 · 2 评论 -
Idiomatic Phrases Game ZOJ - 2750 (hush + dj/bl)
Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. This game will give Tom two idioms. He should build a list of idioms and...原创 2018-08-09 21:53:48 · 121 阅读 · 0 评论 -
XYZZY HDU - 1317 (负权最短路)
t has recently been discovered how to run open-source software on the Y-Crate gaming device. A number of enterprising designers have developed Advent-style games for deployment on the Y-Crate. Your jo...原创 2018-08-07 20:34:48 · 178 阅读 · 0 评论 -
Invitation Cards POJ - 1511 (双向最短路)
n 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. They h...原创 2018-08-07 21:38:53 · 149 阅读 · 0 评论 -
Einbahnstrasse HDU - 2923 (SPFA最短路双向)
Einbahnstra e (German for a one-way street) is a street on which vehicles should only move in one direction. One reason for having one-way streets is to facilitate a smoother flow of traffic through ...原创 2018-08-08 10:51:17 · 151 阅读 · 0 评论 -
F - 确定比赛名次 HDU - 1285 (拓扑排序入门)
确定比赛名次 HDU - 1285 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input输入有若干组,每组中的第一行为二个数N(1...原创 2018-12-06 21:07:05 · 111 阅读 · 0 评论 -
Instrction Arrangement HDU - 4109 (拓扑排序*)
Instrction Arrangement HDU - 4109 Ali has taken the Computer Organization and Architecture course this term. He learned that there may be dependence between instructions, like WAR (write after rea...原创 2018-12-06 21:15:39 · 140 阅读 · 0 评论 -
Oil Skimming HDU - 4185 (二分匹配+建图)
Oil Skimming HDU - 4185 Thanks to a certain "green" resources company, there is a new profitable industry of oil skimming. There are large slicks of crude oil floating in the Gulf of Mexico just w...原创 2019-01-17 19:33:53 · 324 阅读 · 0 评论 -
最短路径·三:SPFA算法(HihoCoder - 1093)(BELLMAN-FORD队列优化)
描述万圣节的晚上,小Hi和小Ho在吃过晚饭之后,来到了一个巨大的鬼屋!鬼屋中一共有N个地点,分别编号为1..N,这N个地点之间互相有一些道路连通,两个地点之间可能有多条道路连通,但是并不存在一条两端都是同一个地点的道路。不过这个鬼屋虽然很大,但是其中的道路并不算多,所以小Hi还是希望能够知道从入口到出口的最短距离是多少?提示:Super Programming Festival Algorithm...原创 2018-05-17 21:12:08 · 168 阅读 · 0 评论