You've got array a[1],?a[2],?...,?a[n], consisting of
n integers. Count the number of ways to split all the elements of the array into three contiguous parts so that the sum of elements in each part ...
分类:
其他好文 时间:
2014-09-16 12:45:20
阅读次数:
164
本系列博文中有很多两种思路的,其实是因为第一遍刷题的时候有一个想法,第二遍刷题的时候已经忘掉之前的思路了,又有新的想法了。
同时大部分代码我也同时PO到leetcode的对应题目的问答中去了,所以如果你也查看问题讨论的话会发现有和我一模一样的代码,其实就是我PO的:)
书接正文,基于循环的两种思路如下:
第一种思路
比如“234”这个字符串,我可以先将0...1的所有排列找到-->...
分类:
其他好文 时间:
2014-09-16 12:42:30
阅读次数:
145
create table DBO.INDEX_POLICY_TBL( ID NUMBER(10) NOT NULL PRIMARY KEY, POLICY_ID NUMBER(10,0) default (-1) NOT NULL, ALARM_COUNT NUMBER(10) default...
分类:
数据库 时间:
2014-09-16 12:21:20
阅读次数:
284
Number Sequence
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536
K (Java/Others)
...
分类:
其他好文 时间:
2014-09-16 10:51:50
阅读次数:
189
1、查看系统内核版本命令
uname命令 uname -a uname -r uname -v
vim /proc/version
more /etc/*release
more /etc/issue
2、查看cpu信息
more /proc/cpuinfo
3、查看cpu位数
getconf LONG_BIT
ls / 如果存在lib64文件夹 说明是系统是64位
4、...
分类:
系统相关 时间:
2014-09-16 10:49:00
阅读次数:
210
当时想到了贪心,但是不知为何举出了反列。。。。我是逗比,看了点击打开链接。才发现我是逗比。
Problem Description
There is a special number sequence which has n+1 integers. For each number in sequence, we have two rules:
● ai ∈ [0,n]
●...
分类:
其他好文 时间:
2014-09-16 02:44:19
阅读次数:
276
1、# smbstatusSamba version 3.6.23PID Username Group Machine --------------------------------------------------...
分类:
其他好文 时间:
2014-09-16 01:30:39
阅读次数:
153
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-09-16 00:15:49
阅读次数:
196
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-09-16 00:05:09
阅读次数:
405
1 /* 2 题意:a, b两个序列,规定由[0, n]区间的数! 3 求 a[i] ^ b[i] 的和最大! 4 5 思路:如果数字 n的二进制有x位, 那么一定存在一个数字m,使得n^m的所有二进制位 6 都是1,也就是由x位1!这样下去的到的值就是...
分类:
其他好文 时间:
2014-09-15 22:43:39
阅读次数:
226