You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you cli...
分类:
其他好文 时间:
2014-08-24 22:00:03
阅读次数:
220
前两天同事问一个oracle使用grouping完成一个统计报表的功能,这个函数帅呆了。开发分组报表直接一个SQL就搞定。
grouping(columnA)函数的意思:当前行如果是由rollup汇总产生的,那么columnA这个字段值为1否则为0
元数据:
通过grouping查询后的数据:
sql:
select decode(grouping(f_line)+g...
分类:
数据库 时间:
2014-08-24 11:43:22
阅读次数:
365
Description
Combinatorics is a branch of mathematics chiefly concerned with counting discrete objects. For instance, how many ways can you pick two people out of a crowd of
n people? Into how many...
分类:
其他好文 时间:
2014-08-23 20:24:01
阅读次数:
317
Consider this sequence {1, 2, 3, … , N}, as a initial sequence of firstN natural numbers. You can rearrange this sequence in many ways. Therewill be
N! different arrangements. You have to calculate t...
分类:
其他好文 时间:
2014-08-23 15:27:01
阅读次数:
202
题目:UVA - 357Let Me Count The Ways(完全背包)
题目大意:给出N,问用1, 5, 10, 25, 50,这些硬币能够凑出N的方式有多少种。
代码:
#include
#include
const int N = 5;
const int maxn = 30005;
const int coin[N] = {1, 5, 10, 25, 50...
分类:
其他好文 时间:
2014-08-22 13:01:38
阅读次数:
150
/usr/local/mysql/bin/mysqlbinlog -vv /var/lib/bin/mysql-bin.000008 --base64-output=DECODE-ROWS --start-pos=307问题:这个究竟是什么意思[root@ma mysql]# /usr/local/...
分类:
数据库 时间:
2014-08-21 16:55:44
阅读次数:
368
[root@ma bin]# /usr/local/mysql/bin/mysqlbinlog -vv /var/lib/bin/mysql-bin.000013 --base64-output=DECODE-ROW/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1...
分类:
其他好文 时间:
2014-08-21 16:55:14
阅读次数:
263
Given a infinite number of quarters(25cents), dimens(10cents), nickels(5cents) and pennies(1cent), write code to calculate the number of ways of repre...
分类:
其他好文 时间:
2014-08-21 12:56:04
阅读次数:
260
How good software makes us stupid?科技是怎样让人变傻的?People assume that iPhones, laptops and Netflix are evidence of progress. In some ways, that's true. A mo...
分类:
其他好文 时间:
2014-08-21 07:21:43
阅读次数:
260
Description
Problem F
Supermean
Time Limit: 2 second
"I have not failed. I've just found 10,000 ways that won't work."
Thomas Edison
Do you know how to compute the mean (or average...
分类:
其他好文 时间:
2014-08-20 21:11:33
阅读次数:
378