一棵树,初始边权和点权都为0现在有m个操作,每一个操作:ADD1 u v k: for nodes on the path from u to v, the value of these nodes increase by k.ADD2 u v k: for edges on the path fr...
分类:
其他好文 时间:
2015-10-10 21:20:25
阅读次数:
207
DescriptionGiven an undirected graph, in which two vertices can be connected by multiple edges, what is the size of the minimum cut of the graph? i.e....
分类:
其他好文 时间:
2015-10-08 10:20:24
阅读次数:
224
意甲冠军:它需要一个特殊的图,以找到最大匹配。该图的特征是:无向图,度的每个节点3。这是一个双边连接组件(the graph is 2-edge-connected (that is, at least 2 edges need to be removed in order to make the ...
分类:
其他好文 时间:
2015-10-02 12:35:51
阅读次数:
266
Problem DescriptionA thief is running away!We can consider the city where he locates as an undirected graph in which nodes stand for crosses and edges...
分类:
其他好文 时间:
2015-09-18 18:00:26
阅读次数:
203
Problem:Givennnodes labeled from0ton - 1and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges m...
分类:
其他好文 时间:
2015-09-12 06:21:54
阅读次数:
428
#define CLK_FREQ ( 10000 )#define CORE_FREQ ( 168000000 )static void TIM_GPIO_Config( void ){ GPIO_InitTypeDef GPIO_InitStructure; // Enable GP...
分类:
其他好文 时间:
2015-09-10 07:05:00
阅读次数:
347
Graph Valid TreeGivennnodes labeled from0ton - 1and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these...
分类:
其他好文 时间:
2015-09-06 12:31:51
阅读次数:
169
二分法+spfa判负环。如果存在一个环sum(wi)using namespace std;const int maxn = 51;struct Edge{ int v,nxt; double w;};vector edges;int head[maxn];#define PB push...
分类:
其他好文 时间:
2015-09-04 11:11:57
阅读次数:
136
SPOJ375 Query on a tree 树链剖分no tagsYou are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ....
分类:
其他好文 时间:
2015-09-02 00:30:17
阅读次数:
176
QTREE2 - Query on a tree II
no tags
You are given a tree (an undirected acyclic connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. Each edge has an integer value
assigned ...
分类:
其他好文 时间:
2015-08-27 02:14:59
阅读次数:
238