原题地址:http://www.cnblogs.com/x1957/p/3373994.html题意:Given an array of integers, every element appearstwiceexcept for one. Find that single one.要求:线性时间复...
分类:
编程语言 时间:
2014-08-28 11:04:19
阅读次数:
274
1096. Get the Right Route Plate!
Time limit: 1.0 second
Memory limit: 64 MB
Everybody who had ridden a Ekaterinburg bus could notice that on the inner side of the plate with the number of t...
分类:
其他好文 时间:
2014-08-28 09:43:49
阅读次数:
331
LeetCode: Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from...
分类:
其他好文 时间:
2014-08-27 21:54:58
阅读次数:
234
http://poj.org/problem?id=3252
"Round Number "被称为其二进制形式中0的个数比1的个数多。求[x,y]区间内“Round Number”的个数。
计数的时候最重要的是处理前导零,前导零不算数,因此与SCOI2009一样,增加一个标记变量first,标志着当前这意味是不是首位,不是首位的话1和0的个数都为0,否则根据枚举的1或0进行记忆...
分类:
其他好文 时间:
2014-08-27 20:36:48
阅读次数:
211
安装JDK 向导进行相关参数设置。如图:
正在安装程序的相关功能,如图:
选择安装的路径,可以自定义,也可以默认路径。如图:
成功安装之后,进行测试是否真的成功安装,点击【开始】----【运行】----输入 CMD,在命令提示符里面输入“Java -version”并按回车键,出现下图,即为安装成功。如图:
下面开始配置环境变量,右击【我的电脑】...
分类:
编程语言 时间:
2014-08-27 18:43:48
阅读次数:
191
1 Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear run...
分类:
其他好文 时间:
2014-08-27 18:38:28
阅读次数:
174
Beans GameTime Limit: 5 Seconds Memory Limit: 32768 KBThere are three piles of beans. TT and DD pick any number of beans from any pile or the same num...
分类:
其他好文 时间:
2014-08-27 18:32:48
阅读次数:
150
[ 问题: ]
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one....
分类:
其他好文 时间:
2014-08-27 16:43:58
阅读次数:
177
代码如下: public void sendMessage(String number) { if (TextUtils.isEmpty(number)) { return; } Intent intent = new Inten...
分类:
移动开发 时间:
2014-08-27 16:03:27
阅读次数:
950
http://acm.hdu.edu.cn/showproblem.php?pid=3709
平衡数。枚举支点的位置,同时记录力臂。
dp[i][j][k]表示当前处理到第i个数,支点的位置是j,当前的力臂是k。因此判断某个数是否是平衡数,只需判断递归终点时力臂是否为0。
#include
#include
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-08-27 14:48:47
阅读次数:
180