题目:气你一个整数n,问多少个节点可以生成n个不同的二叉树。
分析:数论,卡特兰数。根据定义即可。
说明:
#include 
#include 
using namespace std;
long long Cat[100];
int main()
{
	Cat[0] = 1LL;
	for (int i = 1 ; i < 20 ; ++ i)
		Cat[i] = Cat[i...
                            
                            
                                分类:
其他好文   时间:
2014-10-14 11:54:38   
                                阅读次数:
140
                             
                    
                        
                            
                            
                                hibernate中可以一次对多个表进行数据插入,这种插入类似Hibernate的关联映射关系有:多对一 ---- many-to-one一对多 ---- one-to-many一对一 ---- one-to-one多对多 ---- many-to-many比较常用的是多对一和一对一关联映射多对一关...
                            
                            
                                分类:
Web程序   时间:
2014-10-14 00:19:37   
                                阅读次数:
302
                             
                    
                        
                            
                            
                                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 climb to the top?
//第一种解法
class Solution {
pub...
                            
                            
                                分类:
其他好文   时间:
2014-10-13 23:41:27   
                                阅读次数:
393
                             
                    
                        
                            
                            
                                Configure Java APIs (SAX, DOM, dom4j, XOM) using JAXP 1.3 to validate XML Documents with DTD and Schema(s).Many Java XML APIs provide mechanisms to va...
                            
                            
                                分类:
编程语言   时间:
2014-10-12 17:38:38   
                                阅读次数:
395
                             
                    
                        
                            
                            
                                An kind of interesting problem.  Use an array arr[] to store how many gas are left if we travel from station i to station i+1, arr[i] = gas[i] - cost[i]. Then it becomes an variance of the maximal sub...
                            
                            
                                分类:
其他好文   时间:
2014-10-12 06:25:47   
                                阅读次数:
210
                             
                    
                        
                            
                            
                                http://poj.org/problem?id=2312
Battle City
Time Limit: 1000MS
 
Memory Limit: 65536K
Total Submissions: 6903
 
Accepted: 2336
Description
Many of us had played the...
                            
                            
                                分类:
其他好文   时间:
2014-10-11 20:04:46   
                                阅读次数:
339
                             
                    
                        
                            
                            
                                1. I see. 我明白了。2. I quit! 我不干了! 3. Let go! 放手! 4. Me too. 我也是。 5. My god! 天哪! 6. No way! 不行! 7. Come on. 来吧(赶快) 8. Hold on. 等一等。 9. I agree。 我同意。 10. ...
                            
                            
                                分类:
其他好文   时间:
2014-10-11 15:44:05   
                                阅读次数:
252
                             
                    
                        
                            
                            
                                在使用rm删除大批量文件时,有可能会遭遇“参数列太长”(Argument list too long)的问题。如下所示 [oracle@DB-Server bdump]$ rm -v epps_q001_*-bash: /bin/rm: Argument list too long
查看总共有多少个...
                            
                            
                                分类:
系统相关   时间:
2014-10-11 14:55:35   
                                阅读次数:
208
                             
                    
                        
                            
                            
                                RabbitMQ is a lightweight, reliable, scalable and portable message broker. But unlike many message brokers familiar to Java developers, it's not based...
                            
                            
                                分类:
其他好文   时间:
2014-10-11 12:47:55   
                                阅读次数:
349
                             
                    
                        
                            
                            
                                来自:http://blog.csdn.net/cinmyheart/article/details/38747505yaffs2 源码错误错误:2014-08-06Charles Mannin版本的 yaffs 有误!yaffs_flush_file的定义:source file :yaffs_g...
                            
                            
                                分类:
其他好文   时间:
2014-10-11 12:41:45   
                                阅读次数:
668