1 public int singleNumber(int[] A) {2 int s=0;3 for(int i=0;i<A.length;i++){4 s=s^A[i];5 } 6 return...
分类:
其他好文 时间:
2014-07-31 16:13:26
阅读次数:
184
在Eclipse里调试c程序, 出现: "Error while launching command: gdb -version"。需要让Eclipse知道Eclipse具体在什么地方,配置方法是: "Debug configuration"-->"Debugger"-->"GDB debugger"里的"gdb"改成gdb的绝...
分类:
数据库 时间:
2014-07-31 13:48:16
阅读次数:
3416
下面介绍使用ansibleplaybook安装lamp环境下面是apache的安装信息:apr_version:1.5.0
apr_util_version:1.5.3
libiconv_version:1.14
apache_version:2.4.7
apache_web_dir:/data/webroot/apache
apache_log:/data/webroot/apache/logs
apache_vhost:/data/webroot/apache/vho..
分类:
其他好文 时间:
2014-07-31 13:39:48
阅读次数:
404
/*
* php递归函数的用法
* 你玩过吗?
* 下面开始玩一玩
*/
//自己调自己就是回调 实现了一个垒加2垒减2的效果
class digui{
public function index($number){
if($number>0) {
echo $number," ";
...
分类:
其他好文 时间:
2014-07-31 13:32:26
阅读次数:
142
Description
The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.
For a given sequence of numbers a1, a2, ..., an, if we move the ...
分类:
其他好文 时间:
2014-07-31 13:31:46
阅读次数:
229
2^x mod n = 1
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11658 Accepted Submission(s): 3634
Problem Description
Give a number n...
分类:
其他好文 时间:
2014-07-31 13:31:17
阅读次数:
193
1.选中要导出的项目,
右键->export,选中java下的JAR file->next,选择要导出的路径->next,finish。
2.选中导出的jar文件用压缩文件管理器打开
3.有个META-INF目录,把里面的MANIFEST.MF文件拖出来。此时MANIFEST文件内容应该只有下面这一行:
Manifest-Version:1.0...
分类:
编程语言 时间:
2014-07-31 13:27:06
阅读次数:
230
搜索+剪枝如此水的一个题,居然搞了一上午出错在bfs与dfs时共用了一个vis数组,导致bfs完后返回dfs应该能访问到的点访问不到自己想怎么剪枝,想了几个剪枝方法,又证明,又推翻,再想,再证明,再推翻用了好长时间T T自己还是水的不行啊两个剪枝:1.若,当前求出来的解now的长度+当前状态下能访问...
分类:
其他好文 时间:
2014-07-31 13:15:16
阅读次数:
492
思路:统计每位出现的次数,mod3;对于k同样适用 1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int a[32] = {0}; 5 int i = 0; 6 ...
分类:
其他好文 时间:
2014-07-31 13:14:46
阅读次数:
140
Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbe...
分类:
其他好文 时间:
2014-07-31 12:54:46
阅读次数:
704