Pointer (computer programming)Pointer arithmetic cannot be performed on void pointers because the void type has no size, and thus the pointed address ...
分类:
其他好文 时间:
2015-08-27 07:04:27
阅读次数:
181
题目链接:点击打开链接
题意描述:给定一棵树,树上每条边的有一个权值,问从任意一个点出发能走得最长路径是多少?
解题思路:树上最长路径 dp
1、任意找一个点作为根节点,将无根树转化为有根树
2、在dfs过程中更新f[i],g[i],其中f[i]记录以i为节点向下扩展最长路,g[i]为次长路,并用mark标记每个节点最长路的儿子节点
3、在dfs1的过程中更新h[i],h[i]表...
分类:
其他好文 时间:
2015-08-26 20:11:51
阅读次数:
201
The data link layer or layer 2 is the second layer of the seven-layer OSI model of computer networking. The data link layer is concerned with local de...
分类:
其他好文 时间:
2015-08-26 19:22:19
阅读次数:
158
Moving Tables
Problem Description
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.
The floor has 200 rooms ea...
分类:
其他好文 时间:
2015-08-26 13:59:55
阅读次数:
196
http://acm.hdu.edu.cn/showproblem.php?pid=3622
Problem Description
Robbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in th...
分类:
其他好文 时间:
2015-08-26 12:00:22
阅读次数:
123
2015-08-25 008 Foreword QUOTE: I think that it's extraordinarily important that we in computer science keep fun in computing...... What's in your han....
分类:
其他好文 时间:
2015-08-26 09:19:59
阅读次数:
184
$array = array(); $array["key"] = "values"; ?>在PHP中声明数组的方式主要有两种:1.用array()函数声明数组,2.直接为数组元素赋值。 //array数组 $users = array('phone','computer','dos','...
分类:
编程语言 时间:
2015-08-25 23:15:39
阅读次数:
139
最大流+拆点#include#include#include#include#include#include#includeusing namespace std;const int maxn = 2000 + 10;const int INF = 0x7FFFFFFF;struct Edge{ ....
分类:
其他好文 时间:
2015-08-25 23:07:03
阅读次数:
230
Gridland
Problem Description
For years, computer scientists have been trying to find efficient solutions to different computing problems. For some of them efficient algorithms are already avai...
分类:
其他好文 时间:
2015-08-25 19:44:20
阅读次数:
194
The 3n + 1 problem
Problem Description
Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will...
分类:
其他好文 时间:
2015-08-21 21:34:19
阅读次数:
118