我们知道,在图论算法中,求最短路是最基本的问题。在求最短路的问题中,应用双向广度优先搜索算法,又是一个较为高效而又简单的算法。所谓双向广度优先搜索,其实根本的核心还是BFS,只不过它是从起点和终点两头同时搜索,大大提高了搜索效率,又节省了搜索空间。广搜大家知道当然是用队列来实现了,在这里,要注意的问题就是,我们必须按层搜索,正向队列处理一层,接着去处理反向队列的一层,按层交替进行,而不是按节点交替...
                            
                            
                                分类:
其他好文   时间:
2014-09-12 11:59:13   
                                阅读次数:
232
                             
                    
                        
                            
                            
                                分享56本前端工程师必备的javaScript学习书籍(包括了pdf,chm,doc)1、JavaScript权威指南(第6版)(中文版)2、深入浅出Javascript.O‘reilly.Head.First.Javascript.Jan.20083、JavaScript王者归来月影扫描版4、Ja...
                            
                            
                                分类:
编程语言   时间:
2014-09-12 07:47:53   
                                阅读次数:
213
                             
                    
                        
                            
                            
                                Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
                            
                            
                                分类:
其他好文   时间:
2014-09-12 05:41:53   
                                阅读次数:
192
                             
                    
                        
                            
                            
                                先看看官方手册的说明吧:
pairs (t)If t has a metamethod __pairs, calls it with t as argument and returns the first three results from the call.
Otherwise, returns three values: the next function, the table t, a...
                            
                            
                                分类:
其他好文   时间:
2014-09-12 01:16:42   
                                阅读次数:
304
                             
                    
                        
                            
                            
                                参考:http://blog.csdn.net/rually/article/details/8585268#includeusing namespace std;#define MAX 126int first[MAX],second[MAX];void pow(char base[],int ....
                            
                            
                                分类:
其他好文   时间:
2014-09-12 01:10:42   
                                阅读次数:
305
                             
                    
                        
                            
                            
                                搜索....
Machine
Time Limit: 2 Seconds      Memory Limit: 65536 KB
In a typical assembly line, machines are connected one by one. The first machine's output product will be the second mac...
                            
                            
                                分类:
其他好文   时间:
2014-09-11 20:59:42   
                                阅读次数:
186
                             
                    
                        
                            
                            
                                组合数,这题的关键是不能漏解。第一感觉应该是分治法。这里,为了方便叙述,使用一个辅助函数vector> combhelper(int first, int last, int k);含义是从first 到last(左闭右开)的区间中选择K个数的组合数,我们倒过来看,最后一个数(last - 1)或者...
                            
                            
                                分类:
其他好文   时间:
2014-09-11 20:55:12   
                                阅读次数:
187
                             
                    
                        
                            
                            
                                The 2014 ACM-ICPC Asia Mudanjiang Regional First Round
题目链接
A题解题报告
B题解题报告
C题解题报告
D题解题报告
E题解题报告
F题解题报告
G题(未完成)
H题解题报告
I题解题报告
J题解题报告...
                            
                            
                                分类:
其他好文   时间:
2014-09-11 11:15:31   
                                阅读次数:
133
                             
                    
                        
                            
                            
                                Problem D
FILL
 
There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greater than 200). The first and the second jug are initially empty, while the thi...
                            
                            
                                分类:
其他好文   时间:
2014-09-11 09:42:51   
                                阅读次数:
210