Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
                            
                            
                                分类:
其他好文   时间:
2014-11-23 17:19:58   
                                阅读次数:
254
                             
                    
                        
                            
                            
                                Problem F: Fabled Rooks 
 We would like to place
n rooks, 1 ≤ n ≤ 5000, on a n×n board subject to the following restrictions
The i-th rook can only be placed within the rectangle given by its l...
                            
                            
                                分类:
其他好文   时间:
2014-11-21 23:23:27   
                                阅读次数:
308
                             
                    
                        
                            
                            
                                Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
                            
                            
                                分类:
其他好文   时间:
2014-11-21 23:06:22   
                                阅读次数:
242
                             
                    
                        
                            
                            
                                一、游戏效果图:玩家飞机与敌机碰撞 或子弹与敌机碰撞,产生爆炸效果,敌机与子弹在爆炸后消失。
二、实现原理:检测原理的两个对象是否碰撞,JAVA提供了Rectangle这个类,里面的intersects(Rectangle r)方法可以完成这种需求。目前的做法是,把屏幕内的子弹与飞机进行遍历,在遍历的过程用这个方法去检测是否有碰撞出现。
三、敌机与子弹碰撞代码:
pack...
                            
                            
                                分类:
编程语言   时间:
2014-11-21 21:55:16   
                                阅读次数:
350
                             
                    
                        
                            
                            
                                Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest ...
                            
                            
                                分类:
其他好文   时间:
2014-11-21 18:43:17   
                                阅读次数:
196
                             
                    
                        
                            
                            
                                Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest ...
                            
                            
                                分类:
其他好文   时间:
2014-11-21 18:41:59   
                                阅读次数:
174
                             
                    
                        
                            
                            
                                Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?...
                            
                            
                                分类:
其他好文   时间:
2014-11-21 15:38:34   
                                阅读次数:
194
                             
                    
                        
                            
                            
                                Dynamic ProgrammingFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the arra...
                            
                            
                                分类:
其他好文   时间:
2014-11-21 09:06:09   
                                阅读次数:
189
                             
                    
                        
                            
                            
                                By filling a rectangle with slashes (/) and backslashes ( ), you can generate nice
 little mazes. Here is an example:
As you can see, paths in the maze cannot branch, so the whole maze only cont...
                            
                            
                                分类:
其他好文   时间:
2014-11-20 22:04:37   
                                阅读次数:
215
                             
                    
                        
                            
                            
                                给定一个只含0和1的数组,求含1的最大矩形面积。Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.这样的题一般看来都...
                            
                            
                                分类:
其他好文   时间:
2014-11-19 23:44:02   
                                阅读次数:
316