
st算法
coldfresh
那我们开始吧
展开
-
Connections between cities HDU - 2874(LCA)(RMQ)(dfs)(st算法)
After World War X, a lot of cities have been seriously damaged, and we need to rebuild those cities. However, some materials needed can only be produced in certain places. So we need to transport these原创 2017-09-15 16:38:59 · 356 阅读 · 0 评论 -
GCD HDU - 5726 (ST算法+二分)
Give you a sequence of N(N≤100,000)integers : a1,…,an(0#include<cstdio> #include<iostream> #include<queue> #include<cstring> #include<vector> #include<algorithm> #include<cmath> #include<map> #define N原创 2017-09-19 00:54:37 · 721 阅读 · 0 评论 -
Minimum spanning tree for each edge CodeForces - 609E(ST算法+树链剖分(或倍增LCA)+最小生成树)
Connected undirected weighted graph without self-loops and multiple edges is given. Graph contains n vertices and m edges. For each edge (u, v) find the minimal possible weight of the spanning tree t...原创 2018-03-21 13:49:34 · 379 阅读 · 0 评论