Source :http://open-tube.com/12-source-code-profilers-for-cc/Code Profilers are very distinct from traditional debuggers. They are able to catch the t...
分类:
编程语言 时间:
2014-08-04 13:38:17
阅读次数:
467
DescriptionGreg has a weighed directed graph, consisting ofnvertices. In this graph any pair of distinct vertices has an edge between them in both dir...
分类:
其他好文 时间:
2014-08-04 13:30:27
阅读次数:
317
mysql的DISTINCT的关键字有很多你想不到的用处1.在count 不重复的记录的时候能用到比如SELECT COUNT( DISTINCT id ) FROM tablename;就是计算talbebname表中id不同的记录有多少条2,在需要返回记录不同的id的具体值的时候可以用比如SEL...
分类:
数据库 时间:
2014-08-03 12:34:45
阅读次数:
289
group_concat()主要功能:能将相同的行组合起来完整的语法如下:group_concat([DISTINCT] 要连接的字段 [Order BY ASC/DESC 排序字段] [Separator '分隔符'])基本查询Sql代码select*fromaa;+------+------+|...
分类:
数据库 时间:
2014-08-03 12:34:05
阅读次数:
352
本题的题意理解之后,就是求最长回文子序列 longest palindrome subsequence,这里注意子序列和子串的区别。
有两种求法,一种是直接求,相当于填矩阵右上对角阵,另一种是转化为longest common subsequence的求法。
最大难点就是要求内存不能使用二维的。 故此第一种方法是有点难度的,因为需要把二维矩阵的对角线转化为一维表记录,对好下标就好了。
第二中...
分类:
其他好文 时间:
2014-08-02 23:32:34
阅读次数:
326
有一个正整数序列,求最短的子序列使得其和大于等于S,并输出最短的长度。用数组b[i]存放序列的前i项和,所以b[i]是递增的。遍历终点j,然后在区间[0, j)里二分查找满足b[j]-b[i]≥S的最大的i,时间复杂度为O(nlongn)。这里二分查找用到库函数lower_bound() 1 //#...
分类:
其他好文 时间:
2014-08-02 23:20:54
阅读次数:
269
题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you....
分类:
编程语言 时间:
2014-08-02 12:19:43
阅读次数:
389
Distinct SubsequencesGiven a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is...
分类:
其他好文 时间:
2014-08-02 04:17:48
阅读次数:
177
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For exa...
分类:
其他好文 时间:
2014-08-01 23:18:42
阅读次数:
246
sql 单表/多表查询去除重复记录单表distinct多表group bygroup by 必须放在 order by 和 limit之前,不然会报错***************************************************************************...
分类:
数据库 时间:
2014-08-01 12:49:21
阅读次数:
313