http://poj.org/problem?id=3237
Description
You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N ? 1. Each edge is associated with a...
分类:
其他好文 时间:
2015-05-29 18:11:03
阅读次数:
108
题意:在一个正方形内画n个M,求最多能分成多少个平面sol:这种求划分成多少个平面的题第一反应肯定是欧拉公式:二维平面上的欧拉公式:V+F-E=1 (V:Vertices,F:Faces,E:Edges)然后我们画出三个M的情况看一下:(果然Pad是个画图神器。。去年网赛的时候光画图就画了半天...
分类:
其他好文 时间:
2015-05-28 21:24:47
阅读次数:
250
http://www.spoj.com/problems/QTREE/
QTREE - Query on a tree
no tags
You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1.
We w...
分类:
其他好文 时间:
2015-05-27 12:25:26
阅读次数:
127
List ComponentsFor a given undirected graph with N vertices and E edges, please list all the connected components by both DFS and BFS. Assume that all...
分类:
其他好文 时间:
2015-05-27 09:44:09
阅读次数:
144
QTREE - Query on a treeno tags
You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3…N-1.We will ask you to perfrom some instructions of the following...
分类:
其他好文 时间:
2015-05-20 18:31:52
阅读次数:
241
原文:http://www.cocoachina.com/bbs/read.php?tid=301146[view1 mas_makeConstraints:^(MASConstraintMaker *make) {make.edges.equalTo(superview).with.insets(...
分类:
其他好文 时间:
2015-05-20 17:55:43
阅读次数:
153
DescriptionIn graph theory, a matching or independent edge set in a graph G = (V , E) is a set of edges ME such that no two edges in the matching M sh...
分类:
其他好文 时间:
2015-05-17 12:04:26
阅读次数:
127
spoj275-Query on a tree
原题:
QTREE - Query on a tree
no tags
You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1.
We will ask...
分类:
其他好文 时间:
2015-05-17 09:24:58
阅读次数:
122
1607: Do You Have The Template?
Time Limit: 7 Sec Memory Limit: 128 MB
Submit: 112 Solved: 8
[Submit][Status][Web
Board]
Description
There is a tree with N vertices, each edges have a p...
分类:
其他好文 时间:
2015-05-06 06:56:12
阅读次数:
133
#include#include#include#include#includeusing namespace std;#define min( x, y ) (x) edges; vector G[maxn]; int a[maxn]; int p[maxn]; vo...
分类:
其他好文 时间:
2015-05-05 23:11:59
阅读次数:
109