#include#include#includechar *g_WordTable[10]= {"zero", "one", "two", "three", "four", "five","six", "seven", "eight", "nine"};int main(){ //存放用户输入...
分类:
其他好文 时间:
2014-08-02 12:31:53
阅读次数:
530
题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at a....
分类:
编程语言 时间:
2014-08-02 12:17:23
阅读次数:
279
问题:同时使用float:left 和right的时候不在同一水平线上第一种解决办法:把左右对换,比如把日期放在标题的前面,对调下位置就好了。第二种解决办法:给右边也加上float:right浮动不正常的(不在同一行,换行了,仅仅因为多了一个,从而导致整个排版混乱):浮动正常的1:(第一种解决办法:...
分类:
Web程序 时间:
2014-08-02 01:44:12
阅读次数:
168
题意:如果可以的话,使用最少的交换次数,使得字符串变成回文字符串。
思路:首先我们可以先判断这个字符串是否有成为回文的可能性。当一个字符串中出现两个或两个以上的奇数个数的字符,那么这个字符串一定不能成为回文字符串。
之后就要讨论怎么使用最少的交换次数使得变成回文字符串。我们可以采取由外到内的方法,即先将头尾两端的字符交换成相同的,然后left++,right--,慢慢向内靠拢。
为了...
分类:
其他好文 时间:
2014-08-01 23:17:32
阅读次数:
219
inner join(等值连接) 仅仅返回两个表中联结字段相等的行 left join(左联接) 返回包含左表中的全部记录和右表中联结字段相等的记录right join(右联接) 返回包含右表中的全部记录和左表中联结字段相等的记录INNER JOIN 语法:INNER JOIN 连接两个数据表的使用...
分类:
数据库 时间:
2014-08-01 22:50:52
阅读次数:
265
Text JustificationGiven an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) just...
分类:
其他好文 时间:
2014-08-01 22:42:02
阅读次数:
324
Reverse TextTime Limit: 2 Seconds Memory Limit: 65536 KBIn most languages, text is written from left to right. However, there are other languages whe....
分类:
其他好文 时间:
2014-08-01 19:23:32
阅读次数:
202
描述:注意需要先self.connect(right)再self.connect(left),否则会有case通不过,原因是左边递归执行时依赖与右边的next已经建立,而先执行connect(left)的话右边还没有完成关系的建立。代码: 1 class Solution: 2 # @par...
分类:
其他好文 时间:
2014-08-01 19:15:42
阅读次数:
223
Gentlemen, how many times you’ve found yourself with the right girl, wrapped in one another’s arms to create the right moment but have been lost for w...
分类:
其他好文 时间:
2014-08-01 18:31:52
阅读次数:
248
高斯模糊函数的升级版本,带剪裁区域。
函数check_rect()是处理剪裁区域矩形。如果不打算剪裁,只需要设置left, top, right, bottom都为0就可以了;另外位图的存储格式是上下反转的,如果正常剪裁的话,只需要设置bottom为 -bottom即可。...
分类:
其他好文 时间:
2014-08-01 16:10:51
阅读次数:
310