Validate if a given string is numeric.
分类:
其他好文 时间:
2014-07-10 00:16:51
阅读次数:
221
class Solution {public: bool isPalindrome(string s) { int len = s.length(); //if (len -1 && !(b = check2lower(s[q])) ); i...
分类:
其他好文 时间:
2014-06-30 13:43:33
阅读次数:
178
好题,也很实用,犯了几个错误
1.在枚举赋值的时候,思维有个错误:当当前的赋值不能填完这个数独,应该是继续下一个循环,而不是return false 终止枚举
2.Generic Programing写错了,,,本来那个memset想写成Generic Programing的,,,然后,永远只有第一组结果对
不说了,泪哈,,,
#include
#include
#include
#...
分类:
其他好文 时间:
2014-06-30 11:04:33
阅读次数:
157
Sudoku
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 8152
Accepted: 2862
Description
In the game of Sudoku, you are given a large 9 × 9 grid divided in...
分类:
其他好文 时间:
2014-06-29 22:07:32
阅读次数:
279
Word Break IIGiven a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Retur...
分类:
其他好文 时间:
2014-06-28 09:45:34
阅读次数:
223
题目大意:
16*16的数独。
思路分析:
多说无益.
想说的就是dancing links 的行是按照
第一行第一列填 1
第一行第二列填 2
……
第一行第十五列填15
第一行第二列填 1
……
第二行。。。。
列的纺织则是
第一行放1,第一行放2,。。第十六行放16.。。第一列放1.。第一列放2.。。第十六列放16.。第一块区域放1 。。。。...
分类:
其他好文 时间:
2014-06-28 08:14:30
阅读次数:
303
经常使用cd命令切换目录,虽有cd-,历史目录poppush等操作,终究不直观。直接上代码及部署:
i=1
HERE=`pwd`
VALID_HERE=${HERE//\//\\\/}
ALREADY_EXIST=`grep^${HERE}$$1`
declare-agodirs
whiletrue;do
[[$2="a"]]&&[[x${ALREADY_EXIST}="x"]]&&sed-i"/^EOF/..
分类:
系统相关 时间:
2014-06-28 06:50:25
阅读次数:
338
问题描述:thetomcatinstallationdirectoryisnotvalid原因:我在上一页没有选择apachetomcat7.0,因为eclipse版本太低,只有到6.0的server供选择所以这边就算把Name改成7.0,还是配置不了解决方案:安装更高版本的eclipse
分类:
其他好文 时间:
2014-06-28 06:30:26
阅读次数:
575
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A
man, a plan, a canal: Panama" is a palindrome.
"race
a car" is no...
分类:
其他好文 时间:
2014-06-27 10:36:41
阅读次数:
183
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all such possible sentences.
For example, given
s = "...
分类:
其他好文 时间:
2014-06-27 09:23:00
阅读次数:
220