Sum It Up题目:http://acm.hdu.edu.cn/showproblem.php?pid=1258题目的意思:给一个sum的值,给一个n,接下来有n个数这几个数随机组合等于sum时,输出怎么样组合的。注意:不能有重复的解题思路:用DFS深搜,这个我写的时候都把自己搞晕了,看了别.....
分类:
其他好文 时间:
2014-11-27 22:00:34
阅读次数:
214
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源使用情况。top– 00:01:51 up 2:43, 1 user, load average: 0.00, 0.00, 0.00Tasks: 69 total, 1 running, 68 sleeping, 0 sto...
分类:
系统相关 时间:
2014-11-27 18:09:32
阅读次数:
267
题目描述:
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is ...
分类:
其他好文 时间:
2014-11-27 16:16:38
阅读次数:
122
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2014-11-27 16:14:23
阅读次数:
184
如果你在Tools>Options>Editor>Code Completion>Language: Java没有找到设置delay的选项。那就去C盘(如果你用的是Windows的话(就算Netbeans没有装在C盘,这个文件也是在系统盘C盘的))搜索这个文件:org-netbeans-module...
分类:
Web程序 时间:
2014-11-27 12:24:44
阅读次数:
239
If you go to the current version and open up the bin > release folder, you'll get a ZIP file containing the relevant files as well as a Word document ...
自从懂了并查集只后,感觉好多题都是并查集,就像哪一天的字典树一样,这道题一看就是一个并查集,最后查询父节点有几个,
难点:建模的时候应该吧上下联通的和左右联通的标记一下,只要他们和上下左右的都能连通,就把他们并到一个集合里面,我是只判断下和右即可,
源代码:
#include
#include
int up[8], down[8], right[8], left[8];
int par[...
分类:
其他好文 时间:
2014-11-27 09:16:38
阅读次数:
162
cool thing happen today :) envrioment set up and seleniumn can run. let's explore the selenium-webdirversave the comand as bat, so next time just doub...
分类:
编程语言 时间:
2014-11-27 00:00:56
阅读次数:
499
question:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of t...
分类:
其他好文 时间:
2014-11-26 23:59:52
阅读次数:
381
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Solution:The same as N-Quee...
分类:
其他好文 时间:
2014-11-26 23:56:59
阅读次数:
250