原题地址遍历所有数字,统计每一位出现的次数,模3即为只出现一次的数字在那一位的情况。代码: 1 int singleNumber(int A[], int n) { 2 int count[32] = {0}; 3 4 for (int i = 0; i >= 1; 8 } 9 ...
分类:
其他好文 时间:
2015-01-25 18:08:31
阅读次数:
117
单节点安装:
Ip:single:192.168.1.186
1.下载:http://kafka.apache.org/downloads.html 下载源码或者对应scala版本的bin包
2.解压
[root@single cloud]# tar -zxvf kafka_2.10-0.8.2-beta.tgz -C /cloud/
3.进入解压目录
[root@sing...
分类:
其他好文 时间:
2015-01-25 15:18:05
阅读次数:
260
Football
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3297
Accepted: 1687
Description
Consider a single-elimination football tournament involving 2n...
分类:
其他好文 时间:
2015-01-25 11:09:40
阅读次数:
155
重启系统。 进入系统引导界面: 按下e键: 选择第二项,内核启动参数设置,按下e键: 在结尾处,输入数字 1或者 英文 " single",再回车: 按下b键启动,此时以单用户模式级别引导启动程序: 启动完之后,命令passwd修改密码,修改完之后,再命令exit,退出重启,登录时使用刚刚修改后.....
分类:
系统相关 时间:
2015-01-24 14:23:48
阅读次数:
219
DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words an...
分类:
其他好文 时间:
2015-01-23 13:10:17
阅读次数:
115
物理页面 /* * Try to keep the most commonly accessed fields in single cache lines * here (16 bytes or greater). This ordering should be particularly * b.....
分类:
系统相关 时间:
2015-01-22 23:06:34
阅读次数:
208
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input...
分类:
其他好文 时间:
2015-01-22 18:08:59
阅读次数:
145
hibernate继承映射以下测试是在mysql中进行的。1、单表方式Animal.javaJava代码@Entity@Inheritance(strategy=InheritanceType.SINGLE_TABLE)@DiscriminatorColumn(name="animalType")@...
分类:
Web程序 时间:
2015-01-22 17:53:03
阅读次数:
211
Copied from http://www.mssqltips.com/sqlservertip/1771/splitting-delimited-strings-using-xml-in-sql-server/DECLARE @t TABLE ( ID INT IDENTITY ,...
分类:
其他好文 时间:
2015-01-22 17:45:02
阅读次数:
179
Ubuntu的默认开机的runlevel是2,可以用runlevel来查看当前的默认运行级别。
runlevel级别定义如下:
0 – Halt,关机模式
1 – Single,单用户模式
2 - Full multi-user with display manager (GUI)
3 - Full multi-user with display manager (GUI)
4 -...
分类:
系统相关 时间:
2015-01-22 15:37:33
阅读次数:
288