07 2013 档案
摘要:1 =============================以下是最小生成树+并查集====================================== 2 【HDU】 3 1213 How Many Tables 基础并查集★ 4 1272 小希的迷宫 基础并查集★ 5 1325&&poj1308 Is It A Tree? 基础并查集★ 6 1856 More is better 基础并查集★ 7 1102 ...
阅读全文
摘要:Dijkstra最短路模拟每个key的坠落时间,发现就是Dijkstra。求出每个key的时间求其最大值,再求每条边整个坠落的时间,求其最大值,得二者最大值即结果。其中每条边的坠落事件为tv+(cost-(tv-tu))/2,其中u,v为边的两个key节点,tv>tu,cost为边的权值 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn=500+10; 7 const int inf=0x3f3f3f3f; 8 const int maxm=maxn*maxn; 9 s.
阅读全文

浙公网安备 33010602011771号