http://stackoverflow.com/questions/9627774/android-allow-portrait-and-landscape-for-tablets-but-force-portrait-on-phoneHere's a good way usingresource...
分类:
移动开发 时间:
2014-08-08 17:43:16
阅读次数:
779
poj 1655:http://poj.org/problem?id=1655题意: 给无根树, 找出以一节点为根, 使节点最多的树,节点最少。题解:一道树形dp,先dfs 标记 所有节点的子树的节点数。 再dfs 找出以某节点为根的最大子树,节点最少。 复杂度(n)/***Good Luck***...
分类:
其他好文 时间:
2014-08-08 12:25:25
阅读次数:
246
题目大意:
给出一个A串和很多个B串,求出A中有多少个子串,是所有的B中没有出现的。
思路分析:
后缀数组的作用很容易的求出来整个串中不同的子串个数。
现在要求的是A中不同的,且在B中没有出现过的。
先把AB 串全部连接,跑一遍suffix array。然后求出有多少个不同的子串。
然后再单独用B 串跑 suffix array。再求出单独在B 中有多少个不同的 子串。...
分类:
其他好文 时间:
2014-08-07 23:16:25
阅读次数:
257
Network virtualization is a growing topic of interest and for some good reasons as networks scale to meet the challenges of cloud computing they are r...
分类:
Web程序 时间:
2014-08-06 22:23:52
阅读次数:
452
Description
Input
Output
Sample Input
3
5 3 4 15 3 1
10 2 2 7 3 3
100 1 1 100 1 2
Sample Output
4
3
50
题意:求两个等差序列相同的元素个数
思路: 首先我们可以假设得到解...
分类:
其他好文 时间:
2014-08-06 10:26:51
阅读次数:
220
//求一句话里单词的个数 前面空格后面非空格 计数器加1//she is a good girl ====5个int CountWords(char c[]){ int word=0; int sum=0; char *p=c; for (;*p!='\0';p++) ...
分类:
其他好文 时间:
2014-08-06 01:29:40
阅读次数:
196
Problem DescriptionAlice and Bob are playing together. Alice is crazy about art and she has visited many museums around the world. She has a good memo...
如果有时候我们忘记对构造函数使用new的话,构造函数的this将指向window function Person(){ this.name = 'Julie'; } var good_moring = Person(); console.log(good_...
分类:
编程语言 时间:
2014-08-05 15:27:19
阅读次数:
229
本题乍看像是线段树之类的区间操作,不过因为只是需要查找ip的前缀,故此其实是使用Trie来做。
这里的Trie使用到了Delete函数,这是个Trie函数中最难的函数了,当然要使用数组记录的方法水掉,也是可以的。这里不水,给出delete函数。
考点难点:
1 Trie的操作函数的灵活运用,主要难点是delete函数的灵活运用
2 在叶子节点所有的group id, 删除的时候要注意,不...
分类:
其他好文 时间:
2014-08-05 11:13:09
阅读次数:
296
Q: What is Good for enterprise (GFE)?A: A mobile messaging software, allow enterprise internal email synchronize to user's mobile devices, support cli...
分类:
其他好文 时间:
2014-08-04 21:13:38
阅读次数:
321