[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 the two numbers such that they add up to t...
分类:
其他好文 时间:
2014-05-07 05:37:44
阅读次数:
278
递归建树,由题知该树是一棵二叉树,且除根节点外其他点的度为0或2。
dp[i][j]表示来到第i个走廊(还未走过这条走廊)还剩下j时间,能拿到最大的画的数量。
dp[i][j]=max(dp[i][j],dp[lson[i]][k]+dp[rson][last_time-k])
#include
#include
using namespace std;
int dp[200][70...
分类:
其他好文 时间:
2014-05-07 05:02:45
阅读次数:
295
此为C语言的基础,和Linux内核关系并不大,不过还是作为补充知识点介绍一下好了。宏非常频繁的用于执行简单的计算,比如在两个表达式中寻找其中较大的一个:
#define MAX(a,b) ((a)>(b)?(a):(b))
如果使用函数来实现的话就比较慢,宏的话在编译的时候就完成工作,所以使用宏远比使用函数调用效率来的可观。和使用函数相比,使用宏的不利之处就在于每次使用宏的时候,一个宏定义代码...
分类:
其他好文 时间:
2014-05-07 04:59:27
阅读次数:
270
Given a triangle, find the minimum path sum
from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given the fol...
分类:
其他好文 时间:
2014-05-07 02:55:24
阅读次数:
377
1. 推导出函数间隔最小 2. 约束优化函数变形至如下形式 /*min 1/2*||w||^2s.t.
(w[i]*x[i] + b[i] - y[i]) >= 0;*/ 3. 对偶函数 /*min(para alpha)
1/2*sum(i)sum(j)(alpha[i]*alpha[j]*y[i...
分类:
编程语言 时间:
2014-05-07 00:48:13
阅读次数:
498
1、查看所有表的物理大小1 select segment_name, bytes from
user_segments order by bytes desc2、查看表空間的名稱及大小1 select t.tablespace_name,
round(sum(bytes/(1024*1024)),....
分类:
数据库 时间:
2014-05-07 00:30:02
阅读次数:
1232
参考『http://stat-design.blogspot.sg/search?updated-min=2011-01-01T00:00:00-06:00&updated-max=2012-01-01T00:00:00-06:00&max-results=4』
We know that the Mean gives us the central tendency of the data, ...
分类:
其他好文 时间:
2014-05-06 23:10:08
阅读次数:
450
n个数,只能用
F[i][j]=(F[i-1][j]+F[i-1][j-1])*j
F[i][j]代表i个数,有j个不同值的情况。比如A
大数模板
#include
#include
const int MAX =505;
struct BigNum
{
int num[MAX];
int len;
} a[51][51];
BigNum Add(...
分类:
其他好文 时间:
2014-05-06 23:06:51
阅读次数:
364
题意:一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA".
给定若干字母和它们相应的个数,计算一共可以组成多少个不同的字符串.
思路:
(a1+a2+ ... +an)! / a1! / a2! / ... / an! 大数
#include
#include
const int MAX =5...
分类:
其他好文 时间:
2014-05-06 23:05:30
阅读次数:
323
HL Basic 授权锁
圣天诺HL系列中功能最简单、最经济型的硬锁,适合于不需要许可模式和存储空间的软件商。
HL Pro 授权锁
此款产品在HL Basic基础上提供了224字节存储空间。适合对功能模块较少的软件产品,进行高强度保护和许可授权。
HL Max 标准型 授权锁
HL Max系列在性能上是HL Pro更高级的型号。它可以对拥有大量组件的...
分类:
其他好文 时间:
2014-05-06 22:14:39
阅读次数:
422