摘要:        
http://poj.org/problem?id=2983 1 #include 2 #include 3 #include 4 #define maxm 5000100 5 #define maxn 3010 6 using namespace std; 7 int head[maxn],next[maxn],dis[maxn]; 8 bool vis[maxn]; 9 int e,n,m;10 const int inf=1dis[p[j].u]+p[j].c)59 {60 dis[p[j].v]=dis[p[j].u]+p[j]....    阅读全文
posted @ 2013-11-24 17:51
null1019
阅读(160)
评论(0)
推荐(0)
        
            
        
        
摘要:        
http://poj.org/problem?id=1201 1 #include 2 #include 3 #include 4 #define maxn 500100 5 using namespace std; 6 7 int head[maxn],next[maxn],dis[maxn]; 8 bool vis[maxn]; 9 const int inf=1-1)68 {69 int pre=a[top--];70 vis[pre]=false;71 for(int i=head[pre]; i+1; i=next[i])72...    阅读全文
posted @ 2013-11-24 15:45
null1019
阅读(182)
评论(0)
推荐(0)
        
 
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号