题目一:Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
...
分类:
其他好文 时间:
2014-08-12 17:21:54
阅读次数:
250
错误信息:sudo: /etc/sudoers is world writablesudo: no valid sudoers sources found, quitting解决办法:修复磁盘权限就可以了
分类:
其他好文 时间:
2014-08-12 16:58:44
阅读次数:
689
第一次编译是好好的,需要手工输入keystore文件地址和密码等等。第二次不需要输入,然后就直接出错了。 找了一下,发现第一步之后,cocos会记录ant信息到\frameworks\runtime-src\proj.android\ant.properties 打开这个文件发现: key.stor...
分类:
Web程序 时间:
2014-08-12 16:57:24
阅读次数:
246
class Solution {public: int longestValidParentheses(string s) { vector stack; int maxlen = 0; int curlen = 0; int last ...
分类:
其他好文 时间:
2014-08-12 12:54:04
阅读次数:
169
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 po...
分类:
其他好文 时间:
2014-08-12 00:27:33
阅读次数:
264
iSO 8859-1 characters char glyph HTML tag ? ? ¡ ¢ ¢ £ £ ¤ ¤ ¥ ¥ | ¦ § § ¨ ¨ ? © a ª ? « ? ¬ ? ? ® ˉ ...
分类:
Web程序 时间:
2014-08-11 18:20:22
阅读次数:
340
\(O(nlogn)\)可能会超时,最优二叉树有\(O(n)\)的做法,当年合并果子全机房就我最快,哈哈。。开两个队列,一个存放未合并的节点,一个存放合并之后的子树,每次取最小时只需考虑这两个队列中的最小值即可,可以证明在队列内的元素单调。notice: 输入数据已经排好序了,Characters ...
分类:
其他好文 时间:
2014-08-11 08:22:41
阅读次数:
459
这道题是个细节实现题,只要把valid sudoku满足的三个条件判断一下即可。valid sudoku需满足下列三个条件:1)每一行数字1~9有且只出现一次。2)每一列数字1~9有且只出现一次。3)对于每个3*3的sub-box(用i=3、6,j=3、6两条线划分,总共9个sub-box)数字1~...
分类:
其他好文 时间:
2014-08-10 23:57:10
阅读次数:
431
Description
Given a string of 0's and
1's up to
1000000 characters long and indices
i and
j, you are to answer a question whether all characters between position
min(i,j) and position
max(i,j...
分类:
其他好文 时间:
2014-08-10 18:47:30
阅读次数:
277
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
分类:
其他好文 时间:
2014-08-10 15:23:20
阅读次数:
215