1. QString字符串格式化方法如下QString i = "iTest"; // current file's number QString total = "totalTest"; // number of files to process QString...
分类:
其他好文 时间:
2014-10-21 11:52:52
阅读次数:
128
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-10-21 05:43:21
阅读次数:
125
I am trying to convert an address specified by an IP number or a name, both in String (i.e.localhostor127.0.0.1), into anInetAdressobject. There's no ...
分类:
编程语言 时间:
2014-10-21 03:34:56
阅读次数:
201
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers....
分类:
其他好文 时间:
2014-10-21 02:16:08
阅读次数:
163
回文数字。玩过回文字符串之后在玩一个回文数字,相比于最长回文字符串的巧妙,这道题目唯一值得称道的地方可能就是那句Do this without extra space,可以说这是这道题目明面上给出的唯一束缚,当然如果要是看了提示的话,会发现输入的整数是有负整数的可能。也就是说还要处理负数的问题,在这...
分类:
其他好文 时间:
2014-10-21 00:47:55
阅读次数:
204
As you know, all the kids in Berland love playing with cubes. Little Petya has n towers consisting of cubes of the same size. Tower with number i consists
of ai cubes
stacked one on top of the oth...
分类:
其他好文 时间:
2014-10-20 23:23:25
阅读次数:
282
HDU 5014 Number Sequence ( 构造 )题目意思:给出一个数列 由0 - n 组成然后需要构造一个数列 (也是由0-n组成),使得 sum(A[i] ^ B[i])的值最大。分析:异或不能出现比这个数大的情况,,所以要从大的数往前找。现计算出当前判断数的二进制位的位数m,然后再...
分类:
其他好文 时间:
2014-10-20 21:02:32
阅读次数:
136
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font ...
分类:
其他好文 时间:
2014-10-20 20:49:08
阅读次数:
280
problem:Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthe...
分类:
其他好文 时间:
2014-10-20 19:16:49
阅读次数:
182
[Description] There is a number in each stages that indicates the most stages you can leap up. Now, giving an array which represents one kind of stair...
分类:
其他好文 时间:
2014-10-20 18:47:25
阅读次数:
164