P3008 [USACO11JAN]道路和飞机Roads and Planes Dijkstra+Tarjan 因为题目有特殊限制所以不用担心负权的问题 但是朴素的Dijkstra就算用堆优化,也显然会超时。 这是因为Dj每次扩展时,总是找到费用最小那个点进行扩展。 而本题的毒瘤数据可以在一个图(设 ...
分类:
其他好文 时间:
2018-09-21 15:11:53
阅读次数:
164
Problem "CodeForces 835F" 题意:求基环树删去环上任意一边后直径最小值,直径定义为所有点对最近距离的最大值 Solution 首先明确删去环上一点是不会影响树内直径的,所以应当先把所有树的直径求出来,这是树形Dp可以解决的,同时建议使用树形Dp,可以一次性求出接下来要用到的数 ...
分类:
其他好文 时间:
2018-09-18 14:26:18
阅读次数:
140
Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such th ...
分类:
其他好文 时间:
2018-09-09 11:35:44
阅读次数:
266
Travel PP loves travel. Her dream is to travel around country A which consists of N cities and M roads connecting them. PP has measured the money each ...
分类:
其他好文 时间:
2018-09-08 22:36:31
阅读次数:
163
后续开启RISC-V开发相关内容。 RISC-V开发推荐使用Chisel编程语言。Chisel即Constructing Hardware in a Scala Embedded Language: Chisel is an open-source hardware construction lan ...
分类:
其他好文 时间:
2018-09-04 23:29:13
阅读次数:
537
262144K There are NN cities in the country, and MM directional roads from uu to v(1\le u, v\le n)v(1≤u,v≤n). Every road has a distance c_ici?. Haze is ...
分类:
其他好文 时间:
2018-09-04 21:41:11
阅读次数:
333
L.Magical Girl Haze 题目链接: https://nanti.jisuanke.com/t/31001 Description There are N cities in the country, and M directional roads from u to v(1≤u,v≤ ...
分类:
其他好文 时间:
2018-09-02 14:32:47
阅读次数:
177
ACM ICPC 2018 南京赛区网络预赛 Magical Girl Haze 最短路 [TOC] 题面 There are N cities in the country, and M directional roads from uu to v(1$\le$ u, v$\le$ n)v(1≤u ...
分类:
其他好文 时间:
2018-09-01 22:04:53
阅读次数:
152
题目链接:http://poj.org/problem?id=1251 题目: Jungle Roads Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign ...
分类:
其他好文 时间:
2018-08-26 10:31:40
阅读次数:
178
题目: 题目链接: http://poj.org/problem?id=2421 Constructing Roads Description There are N villages, which are numbered from 1 to N, and you should build som ...
分类:
其他好文 时间:
2018-08-26 10:31:10
阅读次数:
148