Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.题目的意思是:给出一组字符串,按组返回拥有相同变位词的字符串解题思路是: ...
分类:
其他好文 时间:
2014-07-06 17:47:10
阅读次数:
210
今天收获还算可以把。。今天过了poj1258和poj1753.1258是一个红果果的最小生成树,写了个prim,用的邻接矩阵。当然邻接表不是很会用,回头会研究图算法,短期内会看的。关于prim算法,比较重要的就以下几个点。1.选取一个点,然后据此更新其他节点的low[]信息2.再执行n-1次操作,每...
分类:
其他好文 时间:
2014-07-06 16:46:19
阅读次数:
166
PostgreSQL正则表达式基础:OperatorDescriptionExample~Matches regular expression, case sensitive'thomas' ~ '.*thomas.*'~*Matches regular expression, case insen...
分类:
其他好文 时间:
2014-07-06 13:31:33
阅读次数:
156
要求:用户从外部导入TXT文件(input textfile),该文件有三列,分别是storeNum,MosrName,MosrNum,如下是一个input textfile的Case:5099,Scoresby,56595250,Scoresby,56595211,Scoresby,5659513...
分类:
其他好文 时间:
2014-07-06 13:12:43
阅读次数:
232
templateint binarySearch(const vector &a, const comparable &x){ int low = 0, high = a.size() - 1; while(low a[center]) low = center ...
分类:
其他好文 时间:
2014-07-06 13:10:01
阅读次数:
188
Swift学习——使用if和switch来进行条件操作,使用for,while,和do-while来进行循环
//switch支持任意类型的数据以及各种比较操作——不仅仅是整数以及测试相等
//注意如果去掉default程序会报错
let strings = "hello3"
switch strings{
case "hello1":
let stringsCo...
分类:
其他好文 时间:
2014-07-06 12:41:35
阅读次数:
186
by:白书
#define M 10000
int pre[M],dfs_clock,iscut[M],low[M],bcc_cnt,bccno[M];
vectorG[M],bcc[M];
struct Edge
{
int u,v;
Edge(int from,int to)
{
u=from;
v=to;
}
};
stack S;
int dfs(int u,int fa...
分类:
其他好文 时间:
2014-07-06 11:29:32
阅读次数:
198
1、const_cast通常被用来将对象的常量刑转换,它也是唯一有此能力的C++-style转型操作符。
2、dynamic_cast主要用来执行“安全向下转型”,也就是用来决定某对象是否归属继承体系中的某个实现。他是唯一无法由旧式语法执行的动作,也是唯一可能耗费重大运行成本的转型动作。
3、reinterpret_case意图执行低级转型,实际动作(及结果)可能取决于编译器,这也就表示它不可...
分类:
编程语言 时间:
2014-07-06 09:01:57
阅读次数:
184
UVALive 6270 Edge Case(找规律,大数相加)...
分类:
其他好文 时间:
2014-07-06 00:01:37
阅读次数:
285
For the exercises in this chapter we need a list of English words. There are lots of word lists available on the Web, but the most suitable for our pu...
分类:
其他好文 时间:
2014-07-05 22:45:55
阅读次数:
545