#include#includeusing namespace std;const int MAX=100010;int DEPest=0,times=0;vector child[MAX]; //child[父亲][孩子] 二维数组表示树形结构void DFS(int root,i...
分类:
其他好文 时间:
2015-03-08 14:08:55
阅读次数:
178
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer...
分类:
其他好文 时间:
2015-03-07 21:08:45
阅读次数:
128
[LeetCode] 019. Remove Nth Node From End of List (Easy) (C++/Python)...
分类:
编程语言 时间:
2015-03-04 21:12:31
阅读次数:
181
这个伪类选择器应该叫子选择器,有多中用途,写法有li:first-child 表示选择每一个ul下li列表中第一个li(亲试那个点不会受影响)li:last-child 同上,只不过是最后一个li:nth-child(even) 选择奇数个li:nth-child(odd) 偶数个li:nth-ch...
分类:
其他好文 时间:
2015-03-04 20:51:02
阅读次数:
172
This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.
Input Specification:
Each input file contains o...
分类:
其他好文 时间:
2015-03-04 09:55:46
阅读次数:
133
A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root ...
分类:
其他好文 时间:
2015-03-02 14:57:37
阅读次数:
151
SQL%NOTFOUND 是一个布尔值。与最近的sql语句(update,insert,delete,select)发生交互,当最近的一条sql语句没有涉及任何行的时候,则返回true。否则返回false。这样的语句在实际应用中,是非常有用的。例如要update一行数据时,如果没有找到,就可以作相应操作。如:
begin
update salary set bonus = 1000...
分类:
数据库 时间:
2015-03-02 13:12:00
阅读次数:
203
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec...
分类:
其他好文 时间:
2015-02-27 21:34:28
阅读次数:
222
61. You are working in an online transaction processing (OLTP) environment. You realize that the salary for an employee, John, has been accidentally m...
分类:
其他好文 时间:
2015-02-27 16:52:33
阅读次数:
464
DECIMAL(M, D)
例 如:salary DECIMAL(5,2)
在这个例子中,5 (精度(precision)) 代表重要的十进制数字的数目,2 (数据范围(scale)) 代表在小数点后的数字位数。在这种情况下,因此,salary 列可以存储的值范围是从 -999.99 到 999.99。(即M代表总位数,D代表小数点后的位数);
当插入的值超过存储值的范围会报错:...
分类:
数据库 时间:
2015-02-27 15:15:56
阅读次数:
187