原题地址:https://oj.leetcode.com/problems/subsets/题意:枚举所有子集。解题思路:碰到这种问题,一律dfs。代码:class 
Solution: # @param S, a list of integer # @return a list of l...
                            
                            
                                分类:
编程语言   时间:
2014-05-30 04:31:09   
                                阅读次数:
1243
                             
                    
                        
                            
                            
                                原题地址:https://oj.leetcode.com/problems/subsets-ii/题意:Given 
a collection of integers that might contain duplicates,S, return all possible 
subsets.Note:E...
                            
                            
                                分类:
编程语言   时间:
2014-05-29 19:10:53   
                                阅读次数:
278
                             
                    
                        
                            
                            
                                原题地址:https://oj.leetcode.com/problems/climbing-stairs/题意:You 
are climbing a stair case. It takesnsteps to reach to the top.Each time you can 
either cl...
                            
                            
                                分类:
编程语言   时间:
2014-05-28 03:27:49   
                                阅读次数:
267
                             
                    
                        
                            
                            
                                原题地址:https://oj.leetcode.com/problems/minimum-path-sum/题意:Given 
amxngrid filled with non-negative numbers, find a path from top left to bottom 
right w...
                            
                            
                                分类:
编程语言   时间:
2014-05-28 03:03:13   
                                阅读次数:
320
                             
                    
                        
                            
                            
                                今天神坑的GCPC 2013 
B题啊,本来是个很简单的模拟+扫描线,却WA的不明不白经过几个人测试,不得不说一下,CSU OJ 的编译器肯定有点问题coj 1458#include 
#include #include #include using namespace std;int b,c;stru...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 19:46:46   
                                阅读次数:
277
                             
                    
                        
                            
                            
                                原题地址:https://oj.leetcode.com/problems/path-sum/题意:Given 
a binary tree and a sum, determine if the tree has a root-to-leaf path such that 
adding up all...
                            
                            
                                分类:
编程语言   时间:
2014-05-26 18:37:11   
                                阅读次数:
295
                             
                    
                        
                            
                            
                                原题地址:https://oj.leetcode.com/problems/unique-binary-search-trees-ii/题意:接上一题,这题要求返回的是所有符合条件的二叉查找树,而上一题要求的是符合条件的二叉查找树的棵数,我们上一题提过,求个数一般思路是动态规划,而枚举的话,我们就考...
                            
                            
                                分类:
编程语言   时间:
2014-05-26 18:30:01   
                                阅读次数:
256
                             
                    
                        
                            
                            
                                开始学习算法导论,看书+笔记+做课后题目+做OJ计划是每天一个小时看书+写笔记挑些课后题目来做,然后一道OJ————————————————————————————————————————今天看随机算法与概率分布,又复习了一下概率论 
- -讲到了两个随机算法:其中一个是随机分布优先度,然后按照优先度...
                            
                            
                                分类:
其他好文   时间:
2014-05-25 22:20:37   
                                阅读次数:
251
                             
                    
                        
                            
                            
                                题目来源:Light OJ 1234  Harmonic Number
题意:
思路:没思路啊 这个是高数的东西 发散 n足够大时它无穷大 直接公式解
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
const int maxn = 1000010;
const doub...
                            
                            
                                分类:
其他好文   时间:
2014-05-25 06:18:44   
                                阅读次数:
213
                             
                    
                        
                            
                            
                                顺便当作介绍 最萌Oj---nbut这应该算我的第一篇 写题目 主要好累 不想做新题目 
而且这题也是蛮有价值的 戳我 好吧 个人还是更喜欢苹果 对棒子的产品无爱 ----话外音题目大意:就是每一行 给你一条线段的2个点 它的2个端点由4个数字 即x 
y x1 y1来表示一共给你N行 我们就来判断.....
                            
                            
                                分类:
其他好文   时间:
2014-05-25 03:40:17   
                                阅读次数:
312