Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes...
分类:
其他好文 时间:
2014-11-24 00:49:37
阅读次数:
239
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-11-23 14:21:58
阅读次数:
205
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-11-23 09:16:30
阅读次数:
150
在正式开始之前,我还是要不厌其烦强调一下:知识就是力量,但是拥有力量不代表着可以为所欲为、触犯法律。同样,骑白马的不一定是王子,会开锁的也不一定是小偷。本文只是关于某些技术的实验与验证,只适用于学习。你知道的越多,就能够越好的保护自己。准备工作首先,无需成为一名网络专家,学会使用复杂的命令行工具,你...
分类:
其他好文 时间:
2014-11-22 23:05:32
阅读次数:
326
String str="abcdefgh";
String newStr=String.SubString(str.length()-i); //从后向前第i位提取
System.out.println(newStr); // 将输出字符串最后三位字符fgh...
分类:
编程语言 时间:
2014-11-22 20:19:28
阅读次数:
206
给定n种物品和一背包。物品i的重量是wi,体积是bi,其价值为vi,背包的容量为C,容积为D。问应如何选择装入背包中的物品,使得装入背包中物品的总价值最大?在选择装入背包的物品时,对每种物品i只有两种选择,即装入背包或者不装入背包。不能将物品i装入背包多次,也不能只装入部分的物品i。试设计一个解此问...
分类:
其他好文 时间:
2014-11-22 15:54:57
阅读次数:
137
String ImgUrl2 = context.Request.QueryString["ImgUrl"]; String ImgUrl = ImgUrl2.Substring(0, ImgUrl2.Length - (ImgUrl2.Length - ImgUrl2.LastIn...
Problem StatementGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindr...
分类:
其他好文 时间:
2014-11-22 13:20:44
阅读次数:
301
前几天无意中发现,Win7的硬件驱动里有个叫Microsoft Virtual WiFi Miniport Adapter的东东,从网上查了一下,可以用来组建临时网络,共享Internet。一块无线网卡只能连接到一个无线网络,因此Windows虚拟出了一个无线网卡,用于组建临时网络,充当AP。简单地...
题意:一棵 n 个结点的树,树边有权值w(0
题目链接:http://poj.org/problem?id=3764
——>>取0为根,预处理出所有结点到根的异或xOr[i]。那么结点 a 与结点 b 之间的路径异或就是xOr[a] ^ xOr[b]。。
权值 w 最多31位,于是,将每个xOr的二进制表示从高位到低位插入到 01 Trie中(0为0,非0为1)。。
查询时从高位开始贪心...
分类:
其他好文 时间:
2014-11-22 10:40:33
阅读次数:
230