WormholesFarmer John's hobby of conducting high-energy physics experiments on weekends has backfired, causing N wormholes (2 B . Bessie will tra...
                            
                            
                                分类:
其他好文   时间:
2015-11-27 10:44:55   
                                阅读次数:
185
                             
                         
                    
                        
                            
                            
                                DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-w...
                            
                            
                                分类:
其他好文   时间:
2015-10-24 17:11:32   
                                阅读次数:
170
                             
                         
                    
                        
                            
                            
                                http://poj.org/problem?id=3259WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:37356Accepted:13734DescriptionWhile exploring his many fa...
                            
                            
                                分类:
其他好文   时间:
2015-09-17 11:41:04   
                                阅读次数:
207
                             
                         
                    
                        
                            
                            
                                Description:While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-...
                            
                            
                                分类:
其他好文   时间:
2015-09-16 12:24:28   
                                阅读次数:
167
                             
                         
                    
                        
                            
                            
                                WormholesFarmer John's hobby of conducting high-energy physics experiments on weekends has backfired, causing N wormholes (2 B . Bessie will tra...
                            
                            
                                分类:
其他好文   时间:
2015-09-08 01:43:47   
                                阅读次数:
209
                             
                         
                    
                        
                            
                            
                                题意: 有N块地,M条无向路,W条有向路,无向路的权值为正,有向路的权值为负,问自否存在负环。思路: 用邻接表保存图,使用SPFA+SLF优化。 判断是否存在负环时,另设一个数组用来记录从源点到各个点的最短路径所经过的路径条数,若路径条数大于等于N(点的个数),说明存在负环。(仔细想想为什么)A.....
                            
                            
                                分类:
编程语言   时间:
2015-09-03 19:06:46   
                                阅读次数:
181
                             
                         
                    
                        
                            
                            
                                题目连接http://poj.org/problem?id=3259WormholesDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A worm...
                            
                            
                                分类:
其他好文   时间:
2015-08-31 19:15:44   
                                阅读次数:
245
                             
                         
                    
                        
                            
                            
                                有个数据能在我机子上跑对,在服务器上过不去,卡了我很久。后来才发现,有个数组大小少开了一个。题意是,有头牛只会沿着x轴正方向走,但是y坐标随机。图上有很多虫洞,两两相连,从一个虫洞进去,从对应虫洞出来之后,牛还是会沿着x轴正方向走,让你统计虫洞两两相连的方式,其中会导致牛陷入循环的个数。关于排列组合...
                            
                            
                                分类:
其他好文   时间:
2015-08-27 20:35:19   
                                阅读次数:
154
                             
                         
                    
                        
                            
                            
                                WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:36860Accepted:13505DescriptionWhile exploring his man...
                            
                            
                                分类:
其他好文   时间:
2015-08-21 10:48:33   
                                阅读次数:
164
                             
                         
                    
                        
                            
                            
                                题目大意:给出出发点和终点和m个虫洞(虫洞的出发点,终点,生成时间和花费时间),问从起点到终点花费的最小时间解题思路:关键是有负环,所以直接跑最短路算法的话会TLE,所以负环要处理一下 
但是这个负环又不是负环,因为负环到一定程度的话,就会消失。 
比如,到达时间小于虫洞的生成时间,那么负环就消失了,也就是说,负环内的点满足的最优情况就是到达时间刚好等于生成时间 
所以,先找出负环,接着判断一下这个...
                            
                            
                                分类:
其他好文   时间:
2015-08-21 01:57:20   
                                阅读次数:
210