锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久婷婷影院,久久国产精品高清,欧美吻胸吃奶大尺度电影http://m.shnenglu.com/MiYu/category/14427.html ______________鐧界櫧銇眿zh-cnSun, 24 Oct 2010 13:01:15 GMTSun, 24 Oct 2010 13:01:15 GMT60Bellman-Ford && SPFA 綆楁硶http://m.shnenglu.com/MiYu/archive/2010/10/23/131018.htmlMiYuMiYuSat, 23 Oct 2010 14:09:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/23/131018.htmlhttp://m.shnenglu.com/MiYu/comments/131018.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/23/131018.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/131018.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/131018.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

 B-F 

閫傜敤鏉′歡&鑼冨洿

  1. 鍗曟簮鏈鐭礬寰?浠庢簮鐐箂鍒板叾瀹冩墍鏈夐《鐐箆);
  2. 鏈夊悜鍥?amp;鏃犲悜鍥?鏃犲悜鍥懼彲浠ョ湅浣?u,v),(v,u)鍚屽睘浜庤竟闆咵鐨勬湁鍚戝浘);
  3. 杈規(guī)潈鍙鍙礋(濡傛湁璐熸潈鍥炶礬杈撳嚭閿欒鎻愮ず);
  4. 宸垎綰︽潫緋葷粺;

綆楁硶鎻忚堪

  1. 瀵規(guī)瘡鏉¤竟榪涜|V|-1嬈elax ( 灝辨槸鏉懼紱鎿嶄綔 )鎿嶄綔;
  2. 濡傛灉瀛樺湪(u,v)∈E浣垮緱dis[u]+w<dis[v],鍒欏瓨鍦ㄨ礋鏉冨洖璺?鍚﹀垯dis[v]鍗充負(fù)s鍒皏鐨勬渶鐭窛紱?pre[v]涓哄墠椹便?/li>
For i:=1 to |V|-1 do //v涓洪《鐐規(guī)暟
For 姣忔潯杈?u,v)∈E do  //瀵規(guī)瘡鏉¤竟榪涜閬嶅巻
  Relax(u,v,w);
For姣忔潯杈?u,v)∈E do
  If dis[u]+w<dis[v] Then Exit(False)

鏃剁┖澶嶆潅搴?/span>

綆楁硶鏃墮棿澶嶆潅搴(VE)銆傚洜涓虹畻娉曠畝鍗曪紝閫傜敤鑼冨洿鍙堝箍錛岃櫧鐒跺鏉傚害紼嶉珮錛屼粛涓嶅け涓轟竴涓緢瀹炵敤鐨勭畻娉曘?/p>

 

綆楁硶鐨勬敼榪?--> SPFA 

 

綆楁硶綆浠?/span>

SPFA(Shortest Path Faster Algorithm)鏄?a title="Bellman-Ford綆楁硶" style="text-decoration: none; color: rgb(90, 54, 150); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; ">Bellman-Ford綆楁硶鐨勪竴縐?a title="闃熷垪" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; ">闃熷垪瀹炵幇錛屽噺灝戜簡(jiǎn)涓嶅繀瑕佺殑鍐椾綑璁$畻銆備篃鏈変漢璇碨PFA鏈潵灝辨槸Bellman-Ford綆楁硶錛岀幇鍦ㄥ箍涓烘祦浼犵殑Bellman-Ford綆楁硶瀹為檯涓婃槸灞卞鐗堛?/p>

綆楁硶嫻佺▼

綆楁硶澶ц嚧嫻佺▼鏄敤涓涓槦鍒楁潵榪涜緇存姢銆?鍒濆鏃跺皢婧愬姞鍏ラ槦鍒椼?姣忔浠庨槦鍒椾腑鍙栧嚭涓涓厓绱狅紝騫跺鎵鏈変笌浠栫浉閭?cè)潥勭偣杩涜?a title="鏉懼紱" style="text-decoration: none; color: rgb(0, 43, 184); background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; ">鏉懼紱錛岃嫢鏌愪釜鐩擱偦鐨勭偣鏉懼紱鎴愬姛錛屽垯灝嗗叾鍏ラ槦銆?鐩村埌闃熷垪涓虹┖鏃剁畻娉曠粨鏉熴?/p>

榪欎釜綆楁硶錛岀畝鍗曠殑璇村氨鏄槦鍒椾紭鍖栫殑bellman-ford,鍒╃敤浜?jiǎn)姣忎釜鐐逛笉浼?xì)鏇存柊嬈℃暟澶鐨勭壒鐐瑰彂鏄庣殑姝ょ畻娉?/p>

SPFA鈥斺擲hortest Path Faster Algorithm錛屽畠鍙互鍦∣(kE)鐨勬椂闂村鏉傚害鍐呮眰鍑烘簮鐐瑰埌鍏朵粬鎵鏈夌偣鐨勬渶鐭礬寰勶紝鍙互澶勭悊璐熻竟銆係PFA鐨勫疄鐜扮敋鑷蟲瘮Dijkstra鎴栬匓ellman_Ford榪樿綆鍗曪細(xì)

璁綝ist浠h〃S鍒癐鐐圭殑褰撳墠鏈鐭窛紱伙紝Fa浠h〃S鍒癐鐨勫綋鍓嶆渶鐭礬寰勪腑I鐐逛箣鍓嶇殑涓涓偣鐨勭紪鍙楓傚紑濮嬫椂Dist鍏ㄩ儴涓?∞錛屽彧鏈塂ist[S]=0錛孎a鍏ㄩ儴涓?銆?/p>

緇存姢涓涓槦鍒楋紝閲岄潰瀛樻斁鎵鏈夐渶瑕佽繘琛岃凱浠g殑鐐廣傚垵濮嬫椂闃熷垪涓彧鏈変竴涓偣S銆傜敤涓涓竷?yōu)當(dāng)鏁熬l勮褰曟瘡涓偣鏄惁澶勫湪闃熷垪涓?/p>

姣忔榪唬錛屽彇鍑洪槦澶寸殑鐐箆錛屼緷嬈℃灇涓句粠v鍑哄彂鐨勮竟v->u錛岃杈圭殑闀垮害涓簂en錛屽垽鏂璂ist[v]+len鏄惁灝忎簬Dist[u]錛岃嫢灝忎簬鍒欐敼榪汥ist[u]錛屽皢Fa[u]璁頒負(fù)v錛屽茍涓旂敱浜嶴鍒皍鐨勬渶鐭窛紱誨彉灝忎簡(jiǎn)錛屾湁鍙兘u鍙互鏀硅繘鍏跺畠鐨勭偣錛屾墍浠ヨ嫢u涓嶅湪闃熷垪涓紝灝卞皢瀹冩斁鍏ラ槦灝俱傝繖鏍蜂竴鐩磋凱浠d笅鍘葷洿鍒伴槦鍒楀彉絀猴紝涔熷氨鏄疭鍒版墍鏈夌殑鏈鐭窛紱婚兘紜畾涓嬫潵錛岀粨鏉熺畻娉曘傝嫢涓涓偣鍏ラ槦嬈℃暟瓚呰繃n錛屽垯鏈夎礋鏉冪幆銆?/p>

SPFA 鍦ㄥ艦寮忎笂鍜屽搴︿紭鍏堟悳绱㈤潪甯哥被浼鹼紝涓嶅悓鐨勬槸瀹藉害浼樺厛鎼滅儲(chǔ)涓竴涓偣鍑轟簡(jiǎn)闃熷垪灝變笉鍙兘閲嶆柊榪涘叆闃熷垪錛屼絾鏄疭PFA涓竴涓偣鍙兘鍦ㄥ嚭闃熷垪涔嬪悗鍐嶆琚斁鍏ラ槦鍒楋紝涔熷氨鏄竴涓偣鏀硅繘榪囧叾瀹冪殑鐐逛箣鍚庯紝榪囦簡(jiǎn)涓孌墊椂闂村彲鑳芥湰韜鏀硅繘錛屼簬鏄啀嬈$敤鏉ユ敼榪涘叾瀹冪殑鐐癸紝榪欐牱鍙嶅榪唬涓嬪幓銆傝涓涓偣鐢ㄦ潵浣滀負(fù)榪唬鐐瑰鍏跺畠鐐硅繘琛屾敼榪涚殑騫沖潎嬈℃暟涓簁錛屾湁鍔炴硶璇佹槑瀵逛簬閫氬父鐨勬儏鍐碉紝k鍦?宸﹀彸

綆楁硶浠g爜

Procedure SPFA;
 
Begin
  initialize-single-source(G,s);
  initialize-queue(Q);
  enqueue(Q,s);
  while not empty(Q) do 
    begin
      u:=dequeue(Q);
      for each v∈adj[u] do 
        begin
          tmp:=d[v];
          relax(u,v);
          if (tmp<>d[v]) and (not v in Q) then
            enqueue(Q,v);
        end;
    end;
End;


procedure spfa;
begin
  fillchar(q,sizeof(q),0); h:=0; t:=0;//闃熷垪
  fillchar(v,sizeof(v),false);//v[i]鍒ゆ柇i鏄惁鍦ㄩ槦鍒椾腑
  for i:=1 to n do 
    dist[i]:=maxint;//鍒濆鍖栨渶灝忓?/span>
 
  inc(t);
  q[t]:=1;
  v[1]:=true;
  dist[1]:=0;//榪欓噷鎶?浣滀負(fù)婧愮偣
 
  while h<>t do
    begin
      h:=(h mod n)+1;
      x:=q[h];
      v[x]:=false;
      for i:=1 to n do
        if (cost[x,i]>0) and (dist[x]+cost[x,i]<dist[i]) then
          begin
            dist[i]:=dist[x]+cost[x,i];
            if not(v[i]) then
              begin
                t:=(t mod n)+1;
                q[t]:=i;
                v[i]:=true;
              end;
          end;
    end;
end;
void SPFA(void)//濂戒箙浠ュ墠鍐欑殑……浠婂ぉ涓笂鏉?#8230;…璇濊鎴戦兘涓嶈寰桽PFA鎬庝箞鍐欎簡(jiǎn)……鍥?#8230;…ms瀛樺浘鏄煩闃?#8230;…鍡棷
{
 int i;
 queue list;
 list.insert(s);
 for(i=1;i<=n;i++)
  {
   if(s==i)
    continue;
   dist[i]=map[s][i];
   way[i]=s;
   if(dist[i])
   list.insert(i);
  }
 int p;
 while(!list.empty())
 {
  p=list.fire();
  for(i=1;i<=n;i++)
   if(map[p][i]&&(dist[i]>dist[p]+map[p][i]||!dist[i])&&i!=s)
    {
     dist[i]=dist[p]+map[p][i];
     way[i]=p;
     if(!list.in(i))
      list.insert(i);
    }
 }
} 

 



MiYu 2010-10-23 22:09 鍙戣〃璇勮
]]>
鍓嶅悜鏄?SPFA(杞澆)http://m.shnenglu.com/MiYu/archive/2010/10/23/131014.htmlMiYuMiYuSat, 23 Oct 2010 14:02:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/23/131014.htmlhttp://m.shnenglu.com/MiYu/comments/131014.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/23/131014.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/131014.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/131014.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

浠g爜
鍓嶅悜鏄?/span>+SPFA
鎴戞槸鍦ㄥ仛USACO鐨剆weet butter鏃跺伓鐒跺彂鐜拌繖涓笢瑗跨殑銆傘傘?br>榪欎釜綆楁硶錛岀畝鍗曠殑璇村氨鏄槦鍒椾紭鍖栫殑bellman
-ford,鍒╃敤浜?jiǎn)姣忎釜鐐逛笉浼?xì)鏇存柊嬈℃暟澶鐨勭壒鐐瑰彂鏄庣殑姝ょ畻娉曪紙浠呬負(fù)涓漢鐞嗚В=.=錛?br>SPFA鈥斺擲hortest Path Faster Algorithm錛屽畠鍙互鍦∣(kE)鐨勬椂闂村鏉傚害鍐呮眰鍑烘簮鐐瑰埌鍏朵粬鎵鏈夌偣鐨勬渶鐭礬寰勶紝鍙互澶勭悊璐熻竟銆係PFA鐨勫疄鐜扮敋鑷蟲瘮Dijkstra鎴栬匓ellman_Ford榪樿綆鍗曪細(xì)
璁綝ist浠h〃S鍒癐鐐圭殑褰撳墠鏈鐭窛紱伙紝Fa浠h〃S鍒癐鐨勫綋鍓嶆渶鐭礬寰勪腑I鐐逛箣鍓嶇殑涓涓偣鐨勭紪鍙楓傚紑濮嬫椂Dist鍏ㄩ儴涓?/span>+∞錛屽彧鏈塂ist[S]=0錛孎a鍏ㄩ儴涓?銆?br>緇存姢涓涓槦鍒楋紝閲岄潰瀛樻斁鎵鏈夐渶瑕佽繘琛岃凱浠g殑鐐廣傚垵濮嬫椂闃熷垪涓彧鏈変竴涓偣S銆傜敤涓涓竷?yōu)當(dāng)鏁熬l勮褰曟瘡涓偣鏄惁澶勫湪闃熷垪涓?br>姣忔榪唬錛屽彇鍑洪槦澶寸殑鐐箆錛屼緷嬈℃灇涓句粠v鍑哄彂鐨勮竟v->u錛岃杈圭殑闀垮害涓簂en錛屽垽鏂璂ist[v]+len鏄惁灝忎簬Dist錛岃嫢灝忎簬鍒欐敼榪汥ist錛屽皢Fa璁頒負(fù)v錛屽茍涓旂敱浜嶴鍒皍鐨勬渶鐭窛紱誨彉灝忎簡(jiǎn)錛屾湁鍙兘u鍙互鏀硅繘鍏跺畠鐨勭偣錛屾墍浠ヨ嫢u涓嶅湪闃熷垪涓紝灝卞皢瀹冩斁鍏ラ槦灝俱傝繖鏍蜂竴鐩磋凱浠d笅鍘葷洿鍒伴槦鍒楀彉絀猴紝涔熷氨鏄疭鍒版墍鏈夌殑鏈鐭窛紱婚兘紜畾涓嬫潵錛岀粨鏉熺畻娉曘?br>SPFA 鍦ㄥ艦寮忎笂鍜屽搴︿紭鍏堟悳绱㈤潪甯哥被浼鹼紝涓嶅悓鐨勬槸瀹藉害浼樺厛鎼滅儲(chǔ)涓竴涓偣鍑轟簡(jiǎn)闃熷垪灝變笉鍙兘閲嶆柊榪涘叆闃熷垪錛屼絾鏄疭PFA涓竴涓偣鍙兘鍦ㄥ嚭闃熷垪涔嬪悗鍐嶆琚斁鍏ラ槦鍒楋紝涔熷氨鏄竴涓偣鏀硅繘榪囧叾瀹冪殑鐐逛箣鍚庯紝榪囦簡(jiǎn)涓孌墊椂闂村彲鑳芥湰韜鏀硅繘錛屼簬鏄啀嬈$敤鏉ユ敼榪涘叾瀹冪殑鐐癸紝榪欐牱鍙嶅榪唬涓嬪幓銆傝涓涓偣鐢ㄦ潵浣滀負(fù)榪唬鐐瑰鍏跺畠鐐硅繘琛屾敼榪涚殑騫沖潎嬈℃暟涓簁錛屾湁鍔炴硶璇佹槑瀵逛簬閫氬父鐨勬儏鍐碉紝k鍦?宸﹀彸
鍓嶅悜鏄熶紭鍖栵細(xì)
涓嶈鎶婂墠鍚戞槦鎯蟲垚浠涔堥珮娣辮帿嫻嬬殑涓滆タ……瀹冨叾瀹炲氨鏄竴縐嶉偦鎺ヨ〃鐨勭揣緙╁瓨鍌ㄥ艦寮忋?br>涓轟粈涔堝彨鍓嶅悜鏄燂紵鍥犱負(fù)瀹冩槸灝嗚竟鎸夌収鍓嶇鐐規(guī)帓搴忥紝騫剁敤涓涓暟緇刱[i]璁板綍绔偣i絎竴嬈′互宸︾鐐瑰嚭鐜扮殑浣嶇疆銆傝繖鏍鳳紝鎴戜滑灝辮兘鐢∣(E)鐨勭┖闂村鏉傚害瀛樺偍涓嬩竴涓偦鎺ヨ〃錛岃岄伩鍏嶄簡(jiǎn)閾捐〃鎴朜
^2鐨勫簽澶х┖闂存秷鑰椼?br>褰撶劧錛屽疄闄呬笂鎴戜滑騫朵笉闇瑕佹帓搴忥細(xì)鍥犱負(fù)鎴戜滑鍙渶瑕佺煡閬撴煇涓鏉¤竟搴旇鏀懼埌浠涔堜綅緗嵆鍙傚洜鑰屾垜浠繕闇瑕佷竴涓暟緇則[i]瀛樺偍浠巌鍑哄彂鐨勮竟鐨勬潯鏁般傚垯闇瑕佸瓨鍌ㄥ湪鐨勪綅緗氨鍙互寰堣交鏄撳湴姹傚緱銆傦紙璇﹁浠g爜錛?br>Butter棰樼洰浠g爜濡備笅錛?br>Program butter(input,output);
Type
   edge
=record
            x,y,d:longint;
        end;
Var
   min,res,n,p,c,x,y,i,j,l,r:longint;
   te,e:array[
0..3000] of edge;
   tk,t,k,num,d:array[
1..800] of longint;
   q:array[
1..100000] of longint;
   use:array[
1..800] of boolean;
Procedure swap(var n1,n2:longint);
Var
   tmp:longint;
Begin
   tmp:
=n1;n1:=n2;n2:=tmp;
End;
Begin
   assign(input,
'butter.in');reset(input);
   readln(n,p,c);
   
for i:=1 to n do
   begin
      read(x);
      inc(num[x]);
   end;
   
for i:=1 to c do
   begin
      with e[i
*2-1do readln(x,y,d);
      e[i
*2]:=e[i*2-1];
      swap(e[i
*2].x,e[i*2].y);
   end;
   c:
=c*2;
   
for i:=1 to c do inc(t[e[i].x]);
   j:
=0;k[1]:=1;
   
for i:=2 to p do
      k[i]:
=k[i-1]+t[i-1];
   tk:
=k;te:=e;
   
for i:=1 to c do
   begin
      e[tk[te[i].x]]:
=te[i];
      inc(tk[te[i].x]);
   end;
   min:
=maxlongint;
   
for i:=1 to p do
   begin
      fillchar(q,
sizeof(q),0);
      fillchar(d,
sizeof(d),127);
      fillchar(use,
sizeof(use),false);
      q[
1]:=i;l:=1;r:=1;d[i]:=0;use[i]:=true;
      repeat
            
for j:=k[q[l]] to k[q[l]]+t[q[l]]-1 do
               
if d[q[l]]+e[j].d<d[e[j].y] then
               begin
                  d[e[j].y]:
=d[q[l]]+e[j].d;
                  
if not use[e[j].y] then
                  begin
                     use[e[j].y]:
=true;
                     inc(r);
                     q[r]:
=e[j].y;
                  end;
               end;
            use[q[l]]:
=false;
            inc(l);
      until l
>r;
      res:
=0;
      
for j:=1 to p do
         res:
=res+d[j]*num[j];
      
if res<min then min:=res;
   end;
   assign(output,
'butter.out');rewrite(output);
   writeln(min);close(output);
End.

 



MiYu 2010-10-23 22:02 鍙戣〃璇勮
]]>
鏉懼紱鎿嶄綔http://m.shnenglu.com/MiYu/archive/2010/10/23/131013.htmlMiYuMiYuSat, 23 Oct 2010 14:01:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/23/131013.htmlhttp://m.shnenglu.com/MiYu/comments/131013.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/23/131013.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/131013.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/131013.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

(閲嶅畾鍚戣嚜鏉懼紱鎶鏈?
銆銆鍗曟簮鏈鐭礬寰勭畻娉曚腑浣跨敤浜?jiǎn)鏉惧紱锛坮elaxation錛夋搷浣溿傚浜庢瘡涓《鐐箆∈V錛岄兘璁劇疆涓涓睘鎬[v]錛岀敤鏉ユ弿榪頒粠婧愮偣s鍒皏鐨勬渶鐭礬寰勪笂鏉冨肩殑涓婄晫錛岀О涓烘渶鐭礬寰勪及璁★紙shortest-path estimate錛夈?#960;[v]浠h〃S鍒皏鐨勫綋鍓嶆渶鐭礬寰勪腑v鐐逛箣鍓嶇殑涓涓偣鐨勭紪鍙?鎴戜滑鐢ㄤ笅闈㈢殑Θ(V)鏃墮棿鐨勮繃紼嬫潵瀵規(guī)渶鐭礬寰勪及璁″拰鍓嶈秼榪涜鍒濆鍖栥?div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">
銆銆INITIALIZE-SINGLE-SOURCE(G,s)
銆銆1 for each vertex v∈V[G]
銆銆2 do d[v]←∞
銆銆3 π[v]←NIL
銆銆4 d[s]←0
銆銆緇忚繃鍒濆鍖栦互鍚庯紝瀵規(guī)墍鏈塿∈V錛?#960;[v]=NIL錛屽v∈V-{s}錛屾湁d[s]=0浠ュ強(qiáng)d[v]=∞銆?div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">
銆銆鍦ㄦ澗寮涗竴鏉¤竟(u,v)鐨勮繃紼嬩腑錛岃嫻嬭瘯鏄惁鍙互閫氳繃u錛屽榪勪粖鎵懼埌鐨剉鐨勬渶鐭礬寰勮繘琛屾敼榪涳紱濡傛灉鍙互鏀硅繘鐨勮瘽錛屽垯鏇存柊d[v]鍜?#960;[v]銆備竴嬈℃澗寮涙搷浣滃彲浠ュ噺灝忔渶鐭礬寰勪及璁$殑鍊糳[v]錛屽茍鏇存柊v鐨勫墠瓚嬪煙π[v](S鍒皏鐨勫綋鍓嶆渶鐭礬寰勪腑v鐐逛箣鍓嶇殑涓涓偣鐨勭紪鍙?銆備笅闈㈢殑浼唬鐮佸杈?u,v)榪涜浜?jiǎn)涓姝ユ澗寮涙搷浣溿?div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">銆銆RELAX(u, v, w)
銆銆1 if(d[v]>d[u]+w(u,v))
銆銆2 then d[v]←d[u]+w(u,v)
銆銆3 π[v]←u
銆銆姣忎釜鍗曟簮鏈鐭礬寰勭畻娉曚腑閮戒細(xì)璋冪敤INITIALIZE-SINGLE-SOURCE錛岀劧鍚庨噸澶嶅杈硅繘琛屾澗寮涚殑榪囩▼銆傚彟澶栵紝鏉懼紱鏄敼鍙樻渶鐭礬寰勫拰鍓嶈秼鐨勫敮涓鏂瑰紡銆傚悇涓崟婧愭渶鐭礬寰勭畻娉曢棿鍖哄埆鍦ㄤ簬瀵規(guī)瘡鏉¤竟榪涜鏉懼紱鎿嶄綔鐨勬鏁幫紝浠ュ強(qiáng)瀵硅竟鎵ц鏉懼紱鎿嶄綔鐨勬搴忔湁鎵涓嶅悓銆傚湪Dijkstra綆楁硶浠ュ強(qiáng)鍏充簬鏈夊悜鏃犲洖璺浘鐨勬渶鐭礬寰勭畻娉曚腑錛屽姣忔潯杈規(guī)墽琛屼竴嬈℃澗寮涙搷浣溿傚湪Bellman-Ford綆楁硶涓紝姣忔潯杈硅鎵ц澶氭鏉懼紱鎿嶄綔銆?div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">銆銆procedure relax(u,v,w:integer);//澶氭暟鎯呭喌涓嬩笉闇瑕佸崟鐙啓鎴恜rocedure銆?div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">銆銆begin
銆銆if dis+w<dis[v] then
銆銆begin
銆銆dis[v]:=dis+w;
銆銆pre[v]:=u;
銆銆end
銆銆end;

 



MiYu 2010-10-23 22:01 鍙戣〃璇勮
]]>
PKU 1258 POJ 1258Agri-Net ( MST Kruskarl 騫舵煡闆?) ACM 1258 IN PKUhttp://m.shnenglu.com/MiYu/archive/2010/10/16/130139.htmlMiYuMiYuSat, 16 Oct 2010 08:30:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/16/130139.htmlhttp://m.shnenglu.com/MiYu/comments/130139.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/16/130139.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/130139.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/130139.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

棰樼洰鍦板潃:

http://poj.org/problem?id=1258

棰樼洰鎻忚堪:

Agri-Net
Time Limit: 1000MSMemory Limit: 10000K
Total Submissions: 16557Accepted: 6745

Description

Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. 
Farmer John ordered a high speed connection for his farm and is going to share his connectivity with the other farmers. To minimize cost, he wants to lay the minimum amount of optical fiber to connect his farm to all the other farms. 
Given a list of how much fiber it takes to connect each pair of farms, you must find the minimum amount of fiber needed to connect them all together. Each farm must connect to some other farm such that a packet can flow from any one farm to any other farm. 
The distance between any two farms will not exceed 100,000. 

Input

The input includes several cases. For each case, the first line contains the number of farms, N (3 <= N <= 100). The following lines contain the N x N conectivity matrix, where each element shows the distance from on farm to another. Logically, they are N lines of N space-separated integers. Physically, they are limited in length to 80 characters, so some lines continue onto others. Of course, the diagonal will be 0, since the distance from farm i to itself is not interesting for this problem.

Output

For each case, output a single integer length that is the sum of the minimum length of fiber required to connect the entire set of farms.

Sample Input

4
0 4 9 21
4 0 8 17
9 8 0 16
21 17 16 0

Sample Output

28

棰樼洰鍒嗘瀽 :
 	MST 姘撮, 鐢↘RUSKARL 鎴?PRIM 杞繪澗鑳借繃.
浠g爜濡備笅 :
/*
Mail to   : miyubai@gamil.com
MyBlog    : http://baiyun.me
Link      : http://www.cnblogs.com/MiYu  || http://m.shnenglu.com/MiYu
Author By : MiYu
Test      : 1
Complier  : g++ mingw32-3.4.2
Program   : Agri-Net
Doc Name  : PKU_1258
*/
//#pragma warning( disable:4789 )
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <queue>
#include <stack>
#include <list>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;
const int MAX = 105;
int st[105];
int N, x, y, w;
struct vv {
       int x, y, val;
       void set ( int a, int b, int w ) { x=a,y=b,val=w; }

}v[10005];       
bool cmp ( const vv &a, const vv &b ) {
          return a.val < b.val;     
}
void creat () {
     for ( int i = 0; i <= N; ++ i )
          st[i] = i;     
}
int find ( int x ) {
    return x != st[x] ? find ( st[x] ) : x;    
}
void merge ( int x, int y ) {
     x = find ( x );
     y = find ( y );
     if ( x == y ) return;
     st[y] = x;     
}
int main ()
{
    while ( scanf ( "%d", &N )==1) {
           creat ();
           memset ( v, 0, sizeof ( v ) );
           int c = 0;
           for ( int i = 1; i <= N; ++ i ) {
                for ( int j = 1; j <= N; ++ j ) {
                     scanf ( "%d", &w );  
                     v[c++].set ( i,j,w );  
                }    
           }     
           sort ( v, v + c, cmp );
           int sum = 0;
           for ( int i = 0 ; i < c; ++ i ) {
                if ( find ( v[i].x ) != find ( v[i].y ) ) {
                    sum += v[i].val;  
                    merge ( v[i].x, v[i].y );
                }    
           }
           printf ( "%d\n", sum );
    }
    return 0;
}

 



MiYu 2010-10-16 16:30 鍙戣〃璇勮
]]>
Floyd-Warshall綆楁硶璇﹁В錛堣漿錛?/title><link>http://m.shnenglu.com/MiYu/archive/2010/09/25/127655.html</link><dc:creator>MiYu</dc:creator><author>MiYu</author><pubDate>Sat, 25 Sep 2010 12:03:00 GMT</pubDate><guid>http://m.shnenglu.com/MiYu/archive/2010/09/25/127655.html</guid><wfw:comment>http://m.shnenglu.com/MiYu/comments/127655.html</wfw:comment><comments>http://m.shnenglu.com/MiYu/archive/2010/09/25/127655.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/MiYu/comments/commentRss/127655.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/MiYu/services/trackbacks/127655.html</trackback:ping><description><![CDATA[<span style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">Floyd-Warshall綆楁硶錛岀畝縐癋loyd綆楁硶錛岀敤浜庢眰瑙d換鎰忎袱鐐歸棿鐨勬渶鐭窛紱伙紝鏃墮棿澶嶆潅搴︿負(fù)O(n^3)銆傛垜浠鉤鏃舵墍瑙佺殑Floyd綆楁硶鐨勪竴鑸艦寮忓涓嬶細(xì)</span><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 1109px; word-break: break-all; padding-top: 4px; background-color: rgb(238, 238, 238); color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; line-height: 20px; "><span style="color: rgb(0, 128, 128); ">1</span> <span style="color: rgb(0, 0, 255); ">void</span><span style="color: rgb(0, 0, 0); "> Floyd(){<br></span><span style="color: rgb(0, 128, 128); ">2</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> i,j,k;<br></span><span style="color: rgb(0, 128, 128); ">3</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(k</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;k</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;k</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">4</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">5</span> <span style="color: rgb(0, 0, 0); ">            </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">6</span> <span style="color: rgb(0, 0, 0); ">                </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(dist[i][k]</span><span style="color: rgb(0, 0, 0); ">+</span><span style="color: rgb(0, 0, 0); ">dist[k][j]</span><span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(0, 0, 0); ">dist[i][j])<br></span><span style="color: rgb(0, 128, 128); ">7</span> <span style="color: rgb(0, 0, 0); ">                    dist[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">dist[i][k]</span><span style="color: rgb(0, 0, 0); ">+</span><span style="color: rgb(0, 0, 0); ">dist[k][j];<br></span><span style="color: rgb(0, 128, 128); ">8</span> <span style="color: rgb(0, 0, 0); ">}</span></div><p style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">  娉ㄦ剰涓嬬6琛岃繖涓湴鏂癸紝濡傛灉dist[i][k]鎴栬卍ist[k][j]涓嶅瓨鍦紝紼嬪簭涓敤涓涓緢澶х殑鏁頒唬鏇褲傛渶濂藉啓鎴恑f(dist[i][k]!=INF && dist[k][j]!=INF && dist[i][k]+dist[k][j]<dist[i][j])錛屼粠鑰岄槻姝㈡孩鍑烘墍閫犳垚鐨勯敊璇?br>  涓婇潰榪欎釜褰㈠紡鐨勭畻娉曞叾瀹炴槸Floyd綆楁硶鐨勭簿綆鐗堬紝鑰岀湡姝g殑Floyd綆楁硶鏄竴縐嶅熀浜嶥P(Dynamic Programming)鐨勬渶鐭礬寰勭畻娉曘?br>  璁懼浘G涓璶 涓《鐐圭殑緙栧彿涓?鍒皀銆備護(hù)c [i, j, k]琛ㄧず浠巌 鍒癹 鐨勬渶鐭礬寰勭殑闀垮害錛屽叾涓璳 琛ㄧず璇ヨ礬寰勪腑鐨勬渶澶ч《鐐癸紝涔熷氨鏄c[i,j,k]榪欐潯鏈鐭礬寰勬墍閫氳繃鐨勪腑闂撮《鐐規(guī)渶澶т笉瓚呰繃k銆傚洜姝わ紝濡傛灉G涓寘鍚竟<i, j>錛屽垯c[i, j, 0] =杈?lt;i, j> 鐨勯暱搴︼紱鑻= j 錛屽垯c[i,j,0]=0錛涘鏋淕涓笉鍖呭惈杈?lt;i, j>錛屽垯c (i, j, 0)= +∞銆俢[i, j, n] 鍒欐槸浠巌 鍒癹 鐨勬渶鐭礬寰勭殑闀垮害銆?br>  瀵逛簬浠繪剰鐨刱>0錛岄氳繃鍒嗘瀽鍙互寰楀埌錛氫腑闂撮《鐐逛笉瓚呰繃k 鐨刬 鍒癹 鐨勬渶鐭礬寰勬湁涓ょ鍙兘錛氳璺緞鍚垨涓嶅惈涓棿欏剁偣k銆傝嫢涓嶅惈錛屽垯璇ヨ礬寰勯暱搴﹀簲涓篶[i, j, k-1]錛屽惁鍒欓暱搴︿負(fù) c[i, k, k-1] +c [k, j, k-1]銆俢[i, j, k]鍙彇涓よ呬腑鐨勬渶灝忓箋?br>  鐘舵佽漿縐繪柟紼嬶細(xì)c[i, j, k]=min{c[i, j, k-1], c [i, k, k-1]+c [k, j, k-1]}錛宬錛?銆?br>  榪欐牱錛岄棶棰樹究鍏鋒湁浜?jiǎn)鏈浼樺瓙緇撴瀯鎬ц川錛屽彲浠ョ敤鍔ㄦ佽鍒掓柟娉曟潵姹傝В銆?/p><p style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; "></p><div align="center" src_cetemp="/images/cppblog_com/mythit/dist.jpg" style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; "><img height="225" alt="" src="http://m.shnenglu.com/images/cppblog_com/mythit/dist.jpg" width="510" border="0"></div><span style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">  涓轟簡(jiǎn)榪涗竴姝ョ悊瑙o紝瑙傚療涓婇潰榪欎釜鏈夊悜鍥撅細(xì)鑻=0, 1, 2, 3錛屽垯c[1,3,k]= +∞錛沜[1,3,4]= 28錛涜嫢k = 5, 6, 7錛屽垯c [1,3,k] = 10錛涜嫢k=8, 9, 10錛屽垯c[1,3,k] = 9銆傚洜姝?鍒?鐨勬渶鐭礬寰勯暱搴︿負(fù)9銆?/span><span style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; "><br></span><span style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">  涓嬮潰閫氳繃紼嬪簭鏉ュ垎鏋愯繖涓DP榪囩▼錛屽搴斾笂闈㈢粰鍑虹殑鏈夊悜鍥撅細(xì)</span><span style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; "><br></span><p style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; "> </p><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 1109px; word-break: break-all; padding-top: 4px; background-color: rgb(238, 238, 238); color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; line-height: 20px; "><span style="color: rgb(0, 128, 128); "> 1</span> <span style="color: rgb(0, 0, 0); ">#include </span><span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(0, 0, 0); ">iostream</span><span style="color: rgb(0, 0, 0); ">></span><span style="color: rgb(0, 0, 0); "><br></span><span style="color: rgb(0, 128, 128); "> 2</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">using</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">namespace</span><span style="color: rgb(0, 0, 0); "> std;<br></span><span style="color: rgb(0, 128, 128); "> 3</span> <span style="color: rgb(0, 0, 0); "><br></span><span style="color: rgb(0, 128, 128); "> 4</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">const</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> INF </span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">100000</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); "> 5</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> n</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">10</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">],dist[</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">];<br></span><span style="color: rgb(0, 128, 128); "> 6</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">void</span><span style="color: rgb(0, 0, 0); "> init(){<br></span><span style="color: rgb(0, 128, 128); "> 7</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> i,j;<br></span><span style="color: rgb(0, 128, 128); "> 8</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); "> 9</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">10</span> <span style="color: rgb(0, 0, 0); ">            map[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">==</span><span style="color: rgb(0, 0, 0); ">j)</span><span style="color: rgb(0, 0, 0); ">?</span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">:INF;<br></span><span style="color: rgb(0, 128, 128); ">11</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">20</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">5</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">12</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">13</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">5</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">5</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">14</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">15</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">10</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">9</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">10</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">9</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">16</span> <span style="color: rgb(0, 0, 0); ">}<br></span><span style="color: rgb(0, 128, 128); ">17</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">void</span><span style="color: rgb(0, 0, 0); "> floyd_dp(){<br></span><span style="color: rgb(0, 128, 128); ">18</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> i,j,k;<br></span><span style="color: rgb(0, 128, 128); ">19</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">20</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">21</span> <span style="color: rgb(0, 0, 0); ">            dist[i][j][</span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">map[i][j];<br></span><span style="color: rgb(0, 128, 128); ">22</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(k</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;k</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;k</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">23</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">24</span> <span style="color: rgb(0, 0, 0); ">            </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">){<br></span><span style="color: rgb(0, 128, 128); ">25</span> <span style="color: rgb(0, 0, 0); ">                dist[i][j][k]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">dist[i][j][k</span><span style="color: rgb(0, 0, 0); ">-</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">];<br></span><span style="color: rgb(0, 128, 128); ">26</span> <span style="color: rgb(0, 0, 0); ">                </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(dist[i][k][k</span><span style="color: rgb(0, 0, 0); ">-</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">+</span><span style="color: rgb(0, 0, 0); ">dist[k][j][k</span><span style="color: rgb(0, 0, 0); ">-</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(0, 0, 0); ">dist[i][j][k])<br></span><span style="color: rgb(0, 128, 128); ">27</span> <span style="color: rgb(0, 0, 0); ">                    dist[i][j][k]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">dist[i][k][k</span><span style="color: rgb(0, 0, 0); ">-</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">+</span><span style="color: rgb(0, 0, 0); ">dist[k][j][k</span><span style="color: rgb(0, 0, 0); ">-</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">];<br></span><span style="color: rgb(0, 128, 128); ">28</span> <span style="color: rgb(0, 0, 0); ">            }<br></span><span style="color: rgb(0, 128, 128); ">29</span> <span style="color: rgb(0, 0, 0); ">}<br></span><span style="color: rgb(0, 128, 128); ">30</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> main(){<br></span><span style="color: rgb(0, 128, 128); ">31</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> k,u,v;<br></span><span style="color: rgb(0, 128, 128); ">32</span> <span style="color: rgb(0, 0, 0); ">    init();<br></span><span style="color: rgb(0, 128, 128); ">33</span> <span style="color: rgb(0, 0, 0); ">    floyd_dp();<br></span><span style="color: rgb(0, 128, 128); ">34</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">while</span><span style="color: rgb(0, 0, 0); ">(cin</span><span style="color: rgb(0, 0, 0); ">>></span><span style="color: rgb(0, 0, 0); ">u</span><span style="color: rgb(0, 0, 0); ">>></span><span style="color: rgb(0, 0, 0); ">v,u</span><span style="color: rgb(0, 0, 0); ">||</span><span style="color: rgb(0, 0, 0); ">v){<br></span><span style="color: rgb(0, 128, 128); ">35</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(k</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">;k</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;k</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">){<br></span><span style="color: rgb(0, 128, 128); ">36</span> <span style="color: rgb(0, 0, 0); ">            </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(dist[u][v][k]</span><span style="color: rgb(0, 0, 0); ">==</span><span style="color: rgb(0, 0, 0); ">INF) cout</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">+∞</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">endl;<br></span><span style="color: rgb(0, 128, 128); ">37</span> <span style="color: rgb(0, 0, 0); ">            </span><span style="color: rgb(0, 0, 255); ">else</span><span style="color: rgb(0, 0, 0); "> cout</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">dist[u][v][k]</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">endl;<br></span><span style="color: rgb(0, 128, 128); ">38</span> <span style="color: rgb(0, 0, 0); ">        }<br></span><span style="color: rgb(0, 128, 128); ">39</span> <span style="color: rgb(0, 0, 0); ">    }<br></span><span style="color: rgb(0, 128, 128); ">40</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">return</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">41</span> <span style="color: rgb(0, 0, 0); ">}</span></div><p style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">  杈撳叆 1 3<br>  杈撳嚭 +∞<br>            +∞<br>            +∞<br>            +∞<br>            28<br>            10<br>            10<br>            10<br>            9<br>            9<br>            9</p><p style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">  Floyd-Warshall綆楁硶涓嶄粎鑳芥眰鍑轟換鎰?鐐歸棿鐨勬渶鐭礬寰勶紝榪樺彲浠ヤ繚瀛樻渶鐭礬寰勪笂緇忚繃鐨勮妭鐐廣備笅闈㈢敤綺劇畝鐗堢殑Floyd綆楁硶瀹炵幇榪欎竴榪囩▼錛岀▼搴忎腑鐨勫浘渚濈劧瀵瑰簲涓婇潰鐨勬湁鍚戝浘銆?br></p><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 1109px; word-break: break-all; padding-top: 4px; background-color: rgb(238, 238, 238); color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; line-height: 20px; "><span style="color: rgb(0, 128, 128); "> 1</span> <span style="color: rgb(0, 0, 0); ">#include </span><span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(0, 0, 0); ">iostream</span><span style="color: rgb(0, 0, 0); ">></span><span style="color: rgb(0, 0, 0); "><br></span><span style="color: rgb(0, 128, 128); "> 2</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">using</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">namespace</span><span style="color: rgb(0, 0, 0); "> std;<br></span><span style="color: rgb(0, 128, 128); "> 3</span> <span style="color: rgb(0, 0, 0); "><br></span><span style="color: rgb(0, 128, 128); "> 4</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">const</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> INF </span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">100000</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); "> 5</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> n</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">10</span><span style="color: rgb(0, 0, 0); ">,path[</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">],dist[</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">],map[</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">11</span><span style="color: rgb(0, 0, 0); ">];<br></span><span style="color: rgb(0, 128, 128); "> 6</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">void</span><span style="color: rgb(0, 0, 0); "> init(){<br></span><span style="color: rgb(0, 128, 128); "> 7</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> i,j;<br></span><span style="color: rgb(0, 128, 128); "> 8</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); "> 9</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">10</span> <span style="color: rgb(0, 0, 0); ">            map[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">==</span><span style="color: rgb(0, 0, 0); ">j)</span><span style="color: rgb(0, 0, 0); ">?</span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">:INF;<br></span><span style="color: rgb(0, 128, 128); ">11</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">20</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">5</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">12</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">13</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">4</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">5</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">5</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">14</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">3</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">6</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">15</span> <span style="color: rgb(0, 0, 0); ">    map[</span><span style="color: rgb(0, 0, 0); ">8</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">10</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">9</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">7</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">2</span><span style="color: rgb(0, 0, 0); ">,map[</span><span style="color: rgb(0, 0, 0); ">10</span><span style="color: rgb(0, 0, 0); ">][</span><span style="color: rgb(0, 0, 0); ">9</span><span style="color: rgb(0, 0, 0); ">]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">16</span> <span style="color: rgb(0, 0, 0); ">}<br></span><span style="color: rgb(0, 128, 128); ">17</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">void</span><span style="color: rgb(0, 0, 0); "> floyd(){<br></span><span style="color: rgb(0, 128, 128); ">18</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> i,j,k;<br></span><span style="color: rgb(0, 128, 128); ">19</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">20</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">21</span> <span style="color: rgb(0, 0, 0); ">            dist[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">map[i][j],path[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">22</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(k</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;k</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;k</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">23</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;i</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;i</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">24</span> <span style="color: rgb(0, 0, 0); ">            </span><span style="color: rgb(0, 0, 255); ">for</span><span style="color: rgb(0, 0, 0); ">(j</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">1</span><span style="color: rgb(0, 0, 0); ">;j</span><span style="color: rgb(0, 0, 0); "><=</span><span style="color: rgb(0, 0, 0); ">n;j</span><span style="color: rgb(0, 0, 0); ">++</span><span style="color: rgb(0, 0, 0); ">)<br></span><span style="color: rgb(0, 128, 128); ">25</span> <span style="color: rgb(0, 0, 0); ">                </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(dist[i][k]</span><span style="color: rgb(0, 0, 0); ">+</span><span style="color: rgb(0, 0, 0); ">dist[k][j]</span><span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(0, 0, 0); ">dist[i][j])<br></span><span style="color: rgb(0, 128, 128); ">26</span> <span style="color: rgb(0, 0, 0); ">                    dist[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">dist[i][k]</span><span style="color: rgb(0, 0, 0); ">+</span><span style="color: rgb(0, 0, 0); ">dist[k][j],path[i][j]</span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); ">k;<br></span><span style="color: rgb(0, 128, 128); ">27</span> <span style="color: rgb(0, 0, 0); ">}<br></span><span style="color: rgb(0, 128, 128); ">28</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">void</span><span style="color: rgb(0, 0, 0); "> output(</span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> i,</span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> j){<br></span><span style="color: rgb(0, 128, 128); ">29</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(i</span><span style="color: rgb(0, 0, 0); ">==</span><span style="color: rgb(0, 0, 0); ">j) </span><span style="color: rgb(0, 0, 255); ">return</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">30</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(path[i][j]</span><span style="color: rgb(0, 0, 0); ">==</span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">) cout</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">j</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">'</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">'</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">31</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">else</span><span style="color: rgb(0, 0, 0); ">{<br></span><span style="color: rgb(0, 128, 128); ">32</span> <span style="color: rgb(0, 0, 0); ">        output(i,path[i][j]);<br></span><span style="color: rgb(0, 128, 128); ">33</span> <span style="color: rgb(0, 0, 0); ">        output(path[i][j],j);<br></span><span style="color: rgb(0, 128, 128); ">34</span> <span style="color: rgb(0, 0, 0); ">    }<br></span><span style="color: rgb(0, 128, 128); ">35</span> <span style="color: rgb(0, 0, 0); ">}<br></span><span style="color: rgb(0, 128, 128); ">36</span> <span style="color: rgb(0, 0, 0); "></span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> main(){<br></span><span style="color: rgb(0, 128, 128); ">37</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> u,v;<br></span><span style="color: rgb(0, 128, 128); ">38</span> <span style="color: rgb(0, 0, 0); ">    init();<br></span><span style="color: rgb(0, 128, 128); ">39</span> <span style="color: rgb(0, 0, 0); ">    floyd();<br></span><span style="color: rgb(0, 128, 128); ">40</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">while</span><span style="color: rgb(0, 0, 0); ">(cin</span><span style="color: rgb(0, 0, 0); ">>></span><span style="color: rgb(0, 0, 0); ">u</span><span style="color: rgb(0, 0, 0); ">>></span><span style="color: rgb(0, 0, 0); ">v,u</span><span style="color: rgb(0, 0, 0); ">||</span><span style="color: rgb(0, 0, 0); ">v){<br></span><span style="color: rgb(0, 128, 128); ">41</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); ">(dist[u][v]</span><span style="color: rgb(0, 0, 0); ">==</span><span style="color: rgb(0, 0, 0); ">INF) cout</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">No path</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">endl;<br></span><span style="color: rgb(0, 128, 128); ">42</span> <span style="color: rgb(0, 0, 0); ">        </span><span style="color: rgb(0, 0, 255); ">else</span><span style="color: rgb(0, 0, 0); ">{<br></span><span style="color: rgb(0, 128, 128); ">43</span> <span style="color: rgb(0, 0, 0); ">            cout</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">u</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">'</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">'</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">44</span> <span style="color: rgb(0, 0, 0); ">            output(u,v);<br></span><span style="color: rgb(0, 128, 128); ">45</span> <span style="color: rgb(0, 0, 0); ">            cout</span><span style="color: rgb(0, 0, 0); "><<</span><span style="color: rgb(0, 0, 0); ">endl;<br></span><span style="color: rgb(0, 128, 128); ">46</span> <span style="color: rgb(0, 0, 0); ">        }<br></span><span style="color: rgb(0, 128, 128); ">47</span> <span style="color: rgb(0, 0, 0); ">    }<br></span><span style="color: rgb(0, 128, 128); ">48</span> <span style="color: rgb(0, 0, 0); ">    </span><span style="color: rgb(0, 0, 255); ">return</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">;<br></span><span style="color: rgb(0, 128, 128); ">49</span> <span style="color: rgb(0, 0, 0); ">}</span></div><p style="color: rgb(75, 75, 75); font-family: georgia, verdana, Arial, helvetica, sans-seriff; font-size: 13px; line-height: 20px; ">  杈撳叆 1 3                    <br>  杈撳嚭 1 2 5 8 6 3</p> <img src ="http://m.shnenglu.com/MiYu/aggbug/127655.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/MiYu/" target="_blank">MiYu</a> 2010-09-25 20:03 <a href="http://m.shnenglu.com/MiYu/archive/2010/09/25/127655.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <a href="http://m.shnenglu.com/">青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品</a> <div style="position:fixed;left:-9000px;top:-9000px;"><font id="pjuwb"></font><button id="pjuwb"><pre id="pjuwb"></pre></button><sub id="pjuwb"></sub><tbody id="pjuwb"><var id="pjuwb"><address id="pjuwb"></address></var></tbody><listing id="pjuwb"><label id="pjuwb"><strong id="pjuwb"></strong></label></listing><wbr id="pjuwb"><small id="pjuwb"><tbody id="pjuwb"></tbody></small></wbr><ins id="pjuwb"><xmp id="pjuwb"></xmp></ins><style id="pjuwb"></style><label id="pjuwb"><em id="pjuwb"><li id="pjuwb"></li></em></label><samp id="pjuwb"></samp><menu id="pjuwb"><input id="pjuwb"></input></menu><pre id="pjuwb"><tbody id="pjuwb"><tfoot id="pjuwb"><button id="pjuwb"></button></tfoot></tbody></pre><form id="pjuwb"></form><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"><sup id="pjuwb"></sup></label></style></i><li id="pjuwb"><table id="pjuwb"><abbr id="pjuwb"></abbr></table></li><video id="pjuwb"></video><dfn id="pjuwb"></dfn><progress id="pjuwb"></progress><strong id="pjuwb"></strong><mark id="pjuwb"></mark><em id="pjuwb"></em><tbody id="pjuwb"><p id="pjuwb"><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike></p></tbody><option id="pjuwb"></option><strike id="pjuwb"></strike><u id="pjuwb"></u><td id="pjuwb"><center id="pjuwb"><tr id="pjuwb"></tr></center></td><em id="pjuwb"><mark id="pjuwb"><em id="pjuwb"><tt id="pjuwb"></tt></em></mark></em><strong id="pjuwb"></strong><wbr id="pjuwb"></wbr><s id="pjuwb"></s><strong id="pjuwb"></strong><legend id="pjuwb"></legend><nav id="pjuwb"></nav><dl id="pjuwb"><th id="pjuwb"><dl id="pjuwb"></dl></th></dl><noframes id="pjuwb"><ins id="pjuwb"></ins></noframes><font id="pjuwb"></font><strike id="pjuwb"><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"></label></style></i></strike><output id="pjuwb"></output><thead id="pjuwb"><pre id="pjuwb"></pre></thead><source id="pjuwb"></source><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem><pre id="pjuwb"><span id="pjuwb"><pre id="pjuwb"><big id="pjuwb"></big></pre></span></pre><cite id="pjuwb"><fieldset id="pjuwb"><s id="pjuwb"><rt id="pjuwb"></rt></s></fieldset></cite><big id="pjuwb"><progress id="pjuwb"><big id="pjuwb"></big></progress></big><samp id="pjuwb"><delect id="pjuwb"></delect></samp><dl id="pjuwb"></dl><strike id="pjuwb"><nav id="pjuwb"><dl id="pjuwb"><strong id="pjuwb"></strong></dl></nav></strike><tbody id="pjuwb"><b id="pjuwb"><optgroup id="pjuwb"><rp id="pjuwb"></rp></optgroup></b></tbody><em id="pjuwb"></em><xmp id="pjuwb"><blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote></xmp> <i id="pjuwb"><abbr id="pjuwb"><i id="pjuwb"><abbr id="pjuwb"></abbr></i></abbr></i><center id="pjuwb"><acronym id="pjuwb"><center id="pjuwb"></center></acronym></center><pre id="pjuwb"></pre><ul id="pjuwb"><thead id="pjuwb"></thead></ul><blockquote id="pjuwb"><pre id="pjuwb"><sup id="pjuwb"></sup></pre></blockquote><acronym id="pjuwb"></acronym><big id="pjuwb"><s id="pjuwb"></s></big><th id="pjuwb"></th><th id="pjuwb"></th><tbody id="pjuwb"></tbody><thead id="pjuwb"><strike id="pjuwb"></strike></thead><th id="pjuwb"><dl id="pjuwb"><wbr id="pjuwb"></wbr></dl></th><dl id="pjuwb"><strong id="pjuwb"></strong></dl><abbr id="pjuwb"><noframes id="pjuwb"><noscript id="pjuwb"></noscript></noframes></abbr><td id="pjuwb"><ol id="pjuwb"></ol></td><li id="pjuwb"><noscript id="pjuwb"><abbr id="pjuwb"></abbr></noscript></li><small id="pjuwb"><bdo id="pjuwb"><nav id="pjuwb"></nav></bdo></small><style id="pjuwb"></style><optgroup id="pjuwb"><table id="pjuwb"></table></optgroup><center id="pjuwb"><tr id="pjuwb"><dfn id="pjuwb"></dfn></tr></center><th id="pjuwb"></th><u id="pjuwb"></u><tfoot id="pjuwb"><legend id="pjuwb"><i id="pjuwb"></i></legend></tfoot><mark id="pjuwb"></mark><meter id="pjuwb"></meter><nav id="pjuwb"></nav><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><nobr id="pjuwb"></nobr><sub id="pjuwb"><th id="pjuwb"><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem></th></sub><thead id="pjuwb"><sub id="pjuwb"></sub></thead><ul id="pjuwb"><address id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></address></ul><dfn id="pjuwb"></dfn><pre id="pjuwb"></pre><input id="pjuwb"><cite id="pjuwb"><fieldset id="pjuwb"></fieldset></cite></input><u id="pjuwb"><form id="pjuwb"><u id="pjuwb"></u></form></u><kbd id="pjuwb"><em id="pjuwb"><mark id="pjuwb"></mark></em></kbd><tr id="pjuwb"></tr><del id="pjuwb"><form id="pjuwb"><address id="pjuwb"></address></form></del><tfoot id="pjuwb"><legend id="pjuwb"><ol id="pjuwb"><dl id="pjuwb"></dl></ol></legend></tfoot><menu id="pjuwb"><nobr id="pjuwb"><th id="pjuwb"><nobr id="pjuwb"></nobr></th></nobr></menu><fieldset id="pjuwb"></fieldset><pre id="pjuwb"><blockquote id="pjuwb"><samp id="pjuwb"></samp></blockquote></pre><xmp id="pjuwb"><sup id="pjuwb"><pre id="pjuwb"></pre></sup></xmp><span id="pjuwb"><progress id="pjuwb"></progress></span><font id="pjuwb"></font><var id="pjuwb"><abbr id="pjuwb"></abbr></var><strong id="pjuwb"><label id="pjuwb"><i id="pjuwb"><legend id="pjuwb"></legend></i></label></strong><tr id="pjuwb"><em id="pjuwb"><em id="pjuwb"><output id="pjuwb"></output></em></em></tr><thead id="pjuwb"><strike id="pjuwb"></strike></thead> <acronym id="pjuwb"></acronym><i id="pjuwb"></i><tt id="pjuwb"></tt><rt id="pjuwb"><source id="pjuwb"><rt id="pjuwb"></rt></source></rt><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike><del id="pjuwb"></del><font id="pjuwb"><output id="pjuwb"><ins id="pjuwb"><output id="pjuwb"></output></ins></output></font><kbd id="pjuwb"><tr id="pjuwb"><kbd id="pjuwb"></kbd></tr></kbd><pre id="pjuwb"><sup id="pjuwb"><delect id="pjuwb"><samp id="pjuwb"></samp></delect></sup></pre><samp id="pjuwb"></samp><track id="pjuwb"></track><tr id="pjuwb"></tr><center id="pjuwb"></center><fieldset id="pjuwb"></fieldset><i id="pjuwb"></i><td id="pjuwb"></td><rt id="pjuwb"></rt><object id="pjuwb"></object><pre id="pjuwb"><progress id="pjuwb"><sub id="pjuwb"><thead id="pjuwb"></thead></sub></progress></pre><kbd id="pjuwb"><tr id="pjuwb"><option id="pjuwb"></option></tr></kbd><output id="pjuwb"><ins id="pjuwb"></ins></output><ol id="pjuwb"></ol><source id="pjuwb"></source><strong id="pjuwb"></strong><ruby id="pjuwb"></ruby><sub id="pjuwb"><meter id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></meter></sub><pre id="pjuwb"></pre><center id="pjuwb"></center><tr id="pjuwb"><tbody id="pjuwb"><xmp id="pjuwb"><dd id="pjuwb"></dd></xmp></tbody></tr><video id="pjuwb"></video><pre id="pjuwb"></pre><form id="pjuwb"><optgroup id="pjuwb"></optgroup></form><samp id="pjuwb"></samp><kbd id="pjuwb"></kbd><strong id="pjuwb"><option id="pjuwb"></option></strong><object id="pjuwb"></object><abbr id="pjuwb"><noframes id="pjuwb"><abbr id="pjuwb"></abbr></noframes></abbr><ul id="pjuwb"><del id="pjuwb"><button id="pjuwb"><pre id="pjuwb"></pre></button></del></ul><abbr id="pjuwb"></abbr><strong id="pjuwb"><code id="pjuwb"><strong id="pjuwb"></strong></code></strong><option id="pjuwb"></option><optgroup id="pjuwb"><bdo id="pjuwb"><code id="pjuwb"></code></bdo></optgroup><mark id="pjuwb"><em id="pjuwb"><font id="pjuwb"></font></em></mark><acronym id="pjuwb"><code id="pjuwb"></code></acronym><dl id="pjuwb"></dl><em id="pjuwb"></em><object id="pjuwb"><input id="pjuwb"><object id="pjuwb"></object></input></object><output id="pjuwb"><dd id="pjuwb"></dd></output><option id="pjuwb"><button id="pjuwb"><option id="pjuwb"></option></button></option><small id="pjuwb"></small></div> <a href="http://hbsmhy.com" target="_blank">亚洲人成网站在线播</a>| <a href="http://caopanjia.com" target="_blank">美女主播精品视频一二三四</a>| <a href="http://4448884.com" target="_blank">在线观看国产成人av片</a>| <a href="http://044925.com" target="_blank">欧美精品1区</a>| <a href="http://by2565.com" target="_blank">暖暖成人免费视频</a>| <a href="http://www224558.com" target="_blank">久久久国产精品一区</a>| <a href="http://caoav8.com" target="_blank">亚洲欧美日韩在线播放</a>| <a href="http://by3799.com" target="_blank">一片黄亚洲嫩模</a>| <a href="http://hhh246.com" target="_blank">激情欧美日韩一区</a>| <a href="http://aydsrmyy.com" target="_blank">国内成+人亚洲+欧美+综合在线</a>| <a href="http://xdlot.com" target="_blank">国产精品成人av性教育</a>| <a href="http://gzhachi.com" target="_blank">欧美色综合网</a>| <a href="http://hkbsi.com" target="_blank">国产一二三精品</a>| <a href="http://woniuminsu.com" target="_blank">亚洲电影在线观看</a>| <a href="http://3534m.com" target="_blank">亚洲天堂成人</a>| <a href="http://26thb.com" target="_blank">午夜精品久久久久</a>| <a href="http://ategpu.com" target="_blank">久久久xxx</a>| <a href="http://91ypp.com" target="_blank">你懂的成人av</a>| <a href="http://jivbus.com" target="_blank">一本到12不卡视频在线dvd</a>| <a href="http://9881600.com" target="_blank">一区二区三区导航</a>| <a href="http://www23009.com" target="_blank">久久精品日韩</a>| <a href="http://www-45553.com" target="_blank">欧美视频中文一区二区三区在线观看 </a>| <a href="http://59199m.com" target="_blank">亚洲午夜在线观看视频在线</a>| <a href="http://xzvaz.com" target="_blank">亚洲精品一级</a>| <a href="http://338pv.com" target="_blank">久久精品99久久香蕉国产色戒</a>| <a href="http://000695.com" target="_blank">久久精品最新地址</a>| <a href="http://www-ss777.com" target="_blank">欧美精品久久久久久久免费观看 </a>| <a href="http://555yye.com" target="_blank">香蕉免费一区二区三区在线观看</a>| <a href="http://shanghaijiagu.com" target="_blank">这里是久久伊人</a>| <a href="http://737sihu.com" target="_blank">久久久精品欧美丰满</a>| <a href="http://www789yys.com" target="_blank">最近中文字幕日韩精品</a>| <a href="http://xxxx43.com" target="_blank">亚洲一区国产一区</a>| <a href="http://b476.com" target="_blank">欧美日韩妖精视频</a>| <a href="http://16355t.com" target="_blank">亚洲激情一区二区</a>| <a href="http://www-72794.com" target="_blank">国产精品久久久久久久久免费</a>| <a href="http://023nszz.com" target="_blank">国产一区二区三区日韩欧美</a>| <a href="http://56qn.com" target="_blank">亚洲在线免费观看</a>| <a href="http://by3180.com" target="_blank">亚洲免费观看</a>| <a href="http://xingcheny.com" target="_blank">欧美精品一二三</a>| <a href="http://alio-ai.com" target="_blank">亚洲日韩欧美一区二区在线</a>| <a href="http://s3yx.com" target="_blank">欧美成人精品激情在线观看</a>| <a href="http://66889h.com" target="_blank">欧美亚洲免费在线</a>| <a href="http://liuyangzi.com" target="_blank">欧美精品一线</a>| <a href="http://xxxbobba.com" target="_blank">日韩午夜高潮</a>| <a href="http://97caoporm.com" target="_blank">亚洲精品视频中文字幕</a>| <a href="http://www-kj777.com" target="_blank">欧美 日韩 国产精品免费观看</a>| <a href="http://998609.com" target="_blank">国产一区二区日韩</a>| <a href="http://www49797.com" target="_blank">久久精品国产第一区二区三区最新章节</a>| <a href="http://wwwavtb1122.com" target="_blank">亚洲高清av在线</a>| <a href="http://77mcn.com" target="_blank">国产精品自在欧美一区</a>| <a href="http://17vx.com" target="_blank">国产精品一区二区在线观看不卡</a>| <a href="http://xxav2121.com" target="_blank">久久久久久欧美</a>| <a href="http://sdsankeguo.com" target="_blank">亚洲国产欧美一区二区三区久久</a>| <a href="http://wwwmm7777.com" target="_blank">美女诱惑黄网站一区</a>| <a href="http://xpfuli.com" target="_blank">亚洲免费精彩视频</a>| <a href="http://hnluvlux.com" target="_blank">亚洲一区二区精品</a>| <a href="http://59812mh.com" target="_blank">黄色成人av网</a>| <a href="http://227c7.com" target="_blank">亚洲国产美女</a>| <a href="http://pinyuanad.com" target="_blank">欧美在线高清</a>| <a href="http://www280999.com" target="_blank">久久成人免费电影</a>| <a href="http://4c8x.com" target="_blank">欧美成人中文字幕</a>| <a href="http://97aixxxx.com" target="_blank">欧美丰满少妇xxxbbb</a>| <a href="http://jiyixitong.com" target="_blank">一区二区国产在线观看</a>| <a href="http://timonna.com" target="_blank">韩国av一区二区三区</a>| <a href="http://77017w.com" target="_blank">国产欧美日韩亚洲一区二区三区 </a>| <a href="http://ff9222.com" target="_blank">亚洲精品一区中文</a>| <a href="http://wwwmm131.com" target="_blank">在线一区二区日韩</a>| <a href="http://www92y.com" target="_blank">蜜桃伊人久久</a>| <a href="http://ximaimicro.com" target="_blank">国产精品va在线播放</a>| <a href="http://4186a.com" target="_blank">欧美大胆人体视频</a>| <a href="http://4106446.com" target="_blank">国产精品一国产精品k频道56</a>| <a href="http://97sgg.com" target="_blank">欧美激情成人在线</a>| <a href="http://papala4444.com" target="_blank">国产情侣久久</a>| <a href="http://birhit.com" target="_blank">夜夜精品视频</a>| <a href="http://www-77537.com" target="_blank">亚洲欧美日韩另类</a>| <a href="http://feiniao168.com" target="_blank">新狼窝色av性久久久久久</a>| <a href="http://5254f.com" target="_blank">国产日韩精品一区二区三区</a>| <a href="http://xmzszx.com" target="_blank">蘑菇福利视频一区播放</a>| <a href="http://kongtou8.com" target="_blank">欧美日韩国产999</a>| <a href="http://k37b.com" target="_blank">欧美高清视频</a>| <a href="http://saobi6.com" target="_blank">国产精品―色哟哟</a>| <a href="http://479n.com" target="_blank">农村妇女精品</a>| <a href="http://6688zf.com" target="_blank">国产麻豆精品久久一二三</a>| <a href="http://cc28256.com" target="_blank">亚洲社区在线观看</a>| <a href="http://baidijs.com" target="_blank">亚洲精品一区在线观看香蕉</a>| <a href="http://xxdd19.com" target="_blank">性高湖久久久久久久久</a>| <a href="http://zisxks.com" target="_blank">欧美资源在线观看</a>| <a href="http://8222666.com" target="_blank">国产精品日日摸夜夜添夜夜av</a>| <a href="http://2996611.com" target="_blank">亚洲第一中文字幕</a>| <a href="http://www72227.com" target="_blank">国产一区视频网站</a>| <a href="http://3dxxoo.com" target="_blank">亚洲女爱视频在线</a>| <a href="http://133868.com" target="_blank">午夜欧美精品</a>| <a href="http://mishangmi.com" target="_blank">国产精品国产三级国产普通话三级 </a>| <a href="http://wwwhhh396.com" target="_blank">欧美不卡激情三级在线观看</a>| <a href="http://www49966.com" target="_blank">久久国产精品网站</a>| <a href="http://77427xyz.com" target="_blank">欧美日韩免费观看一区</a>| <a href="http://hh474.com" target="_blank">亚洲精品视频在线观看网站</a>| <a href="http://9927tv.com" target="_blank">亚洲国产欧美一区二区三区久久</a>| <a href="http://kk8c.com" target="_blank">亚洲日本成人网</a>| <a href="http://6h8c.com" target="_blank">欧美在线日韩</a>| <a href="http://www-82622.com" target="_blank">一二三四社区欧美黄</a>| <a href="http://haixian360.com" target="_blank">亚洲精品一区二区三</a>| <a href="http://34ak.com" target="_blank">快she精品国产999</a>| <a href="http://tv-miya188.com" target="_blank">亚洲黄色影院</a>| <a href="http://bbww55.com" target="_blank">亚洲精选视频免费看</a>| <a href="http://668www.com" target="_blank">亚洲黄色av一区</a>| <a href="http://www-06654.com" target="_blank">亚洲一区二区三区在线看 </a>| <a href="http://tizenkorea.com" target="_blank">国产精品亚洲视频</a>| <a href="http://nxhjzddata.com" target="_blank">蜜桃精品久久久久久久免费影院</a>| <a href="http://kanzhelu31.com" target="_blank">欧美一区二区视频97</a>| <a href="http://wwwhhh396.com" target="_blank">国内综合精品午夜久久资源</a>| <a href="http://zhongqingshiye.com" target="_blank">先锋影音国产一区</a>| <a href="http://sese135.com" target="_blank">亚洲欧洲视频</a>| <a href="http://musicshq.com" target="_blank">久久久久免费视频</a>| <a href="http://679776.com" target="_blank">艳妇臀荡乳欲伦亚洲一区</a>| <a href="http://japanjavbibi.com" target="_blank">韩国v欧美v日本v亚洲v</a>| <a href="http://maokk77.com" target="_blank">久久这里只有</a>| <a href="http://tongrenyaoye.com" target="_blank">亚洲欧洲日本mm</a>| <a href="http://tom3958.com" target="_blank">午夜欧美精品</a>| <a href="http://25axxa.com" target="_blank">影音先锋另类</a>| <a href="http://arielteam.com" target="_blank">国产日韩欧美在线播放不卡</a>| <a href="http://687673.com" target="_blank">久久久久一区二区三区</a>| <a href="http://www38ccc.com" target="_blank">一区二区国产精品</a>| <a href="http://tk263.com" target="_blank">亚洲看片一区</a>| <a href="http://域名" target="_blank">亚洲福利电影</a>| <a href="http://by33336.com" target="_blank">欧美激情一区二区三区在线视频 </a>| <a href="http://www-85489.com" target="_blank">亚洲欧美综合另类中字</a>| <a href="http://k-dchina.com" target="_blank">欧美激情aaaa</a>| <a href="http://eee104.com" target="_blank">美女露胸一区二区三区</a>| <a href="http://767296.com" target="_blank">免费亚洲一区二区</a>| <a href="http://1392266.com" target="_blank">久久亚洲欧美</a>| <a href="http://lzklpc.com" target="_blank">欧美1区3d</a>| <a href="http://www48929.com" target="_blank">亚洲国产另类久久精品</a>| <a href="http://3dmh133.com" target="_blank">久久人人爽人人爽</a>| <a href="http://06le.com" target="_blank">国产一区二区日韩精品欧美精品</a>| <a href="http://juegold.com" target="_blank">亚洲日本成人女熟在线观看</a>| <a href="http://dusenborg.com" target="_blank">亚洲精品久久久久久下一站</a>| <a href="http://by8556.com" target="_blank">免费成人小视频</a>| <a href="http://300644.com" target="_blank">美女在线一区二区</a>| <a href="http://56myf.com" target="_blank">免费欧美日韩</a>| <a href="http://6556h.com" target="_blank">亚洲黄色在线观看</a>| <a href="http://xxxyyy168.com" target="_blank">一区二区三区四区在线</a>| <a href="http://1277k.com" target="_blank">亚洲精品视频免费观看</a>| <a href="http://missav88.com" target="_blank">日韩五码在线</a>| <a href="http://maoshimh.com" target="_blank">欧美亚洲在线</a>| <a href="http://rezel-zj.com" target="_blank">欧美www视频在线观看</a>| <a href="http://389746.com" target="_blank">欧美日韩一级片在线观看</a>| <a href="http://bjzgmember.com" target="_blank">国际精品欧美精品</a>| <a href="http://btbt7086.com" target="_blank">99国产精品</a>| <a href="http://77777de.com" target="_blank">噜噜噜91成人网</a>| <a href="http://yqr55.com" target="_blank">夜夜狂射影院欧美极品</a>| <a href="http://00000i.com" target="_blank">欧美在线影院</a>| <a href="http://nc04.com" target="_blank">国产精品久久99</a>| <a href="http://1x118.com" target="_blank">亚洲欧美视频</a>| <a href="http://xindefalv.com" target="_blank">亚洲大胆人体视频</a>| <a href="http://aqdav037.com" target="_blank">亚洲欧美日韩一区二区</a>| <a href="http://909059c.com" target="_blank">久久九九精品</a>| <a href="http://www387333.com" target="_blank">国产区精品视频</a>| <a href="http://48655aa.com" target="_blank">一区二区三区久久精品</a>| <a href="http://ycpeixun.com" target="_blank">国产精品久久久久久久久果冻传媒</a>| <a href="http://ximaimicro.com" target="_blank">亚洲一区二区精品在线观看</a>| <a href="http://6h8c.com" target="_blank">亚洲一区二区三区高清不卡</a>| <a href="http://clgtzz.com" target="_blank">久久久99精品免费观看不卡</a>| <a href="http://y65v.com" target="_blank">亚洲精品久久久久久久久</a>| <a href="http://sh-hxjdkj.com" target="_blank">亚洲欧美日本在线</a>| <a href="http://0855123.com" target="_blank">欧美少妇一区</a>| <a href="http://vipaqdx29.com" target="_blank">99成人在线</a>| <a href="http://7sscc.com" target="_blank">亚洲精品中文字幕在线观看</a>| <a href="http://6u6uuu666.com" target="_blank">久久九九久精品国产免费直播</a>| <a href="http://880895.com" target="_blank">欧美性色综合</a>| <a href="http://www-e2222.com" target="_blank">欧美一级电影久久</a>| <a href="http://ydpszcn.com" target="_blank">亚洲欧洲99久久</a>| <a href="http://6168138.com" target="_blank">久久综合精品国产一区二区三区</a>| <a href="http://211186.com" target="_blank">欧美理论在线</a>| <a href="http://hu62.com" target="_blank">午夜亚洲激情</a>| <a href="http://xhs1039.com" target="_blank">久久―日本道色综合久久</a>| <a href="http://xiehaihua.com" target="_blank">午夜在线不卡</a>| <a href="http://zxxx3.com" target="_blank">黄色亚洲大片免费在线观看</a>| <a href="http://chunhuigk.com" target="_blank">亚洲国产精品尤物yw在线观看</a>| <a href="http://mom8888.com" target="_blank">免费观看欧美在线视频的网站</a>| <a href="http://www-787788.com" target="_blank">欧美人与性动交α欧美精品济南到</a>| <a href="http://19zet.com" target="_blank">亚洲日本中文</a>| <a href="http://uuuu30.com" target="_blank">亚洲午夜国产一区99re久久 </a>| <a href="http://www962aa.com" target="_blank">亚洲天堂成人在线观看</a>| <a href="http://2jjzz.com" target="_blank">亚洲第一网站</a>| <a href="http://5773000.com" target="_blank">亚洲欧洲在线播放</a>| <a href="http://sese135.com" target="_blank">美女黄毛**国产精品啪啪</a>| <a href="http://ss2ssc.com" target="_blank">在线观看精品视频</a>| <a href="http://jpqueyou.com" target="_blank">国产精品人人做人人爽人人添</a>| <a href="http://yytaotu.com" target="_blank">国产精品成人aaaaa网站</a>| <a href="http://227c7.com" target="_blank">久久久久欧美</a>| <a href="http://baostat.com" target="_blank">欧美成人性网</a>| <a href="http://luoliguo.com" target="_blank">国产精品爱啪在线线免费观看</a>| <a href="http://heyzo1199.com" target="_blank">老色鬼精品视频在线观看播放</a>| <a href="http://www308eee.com" target="_blank">久久综合中文字幕</a>| <a href="http://91pero.com" target="_blank">欧美日韩1区2区</a>| <a href="http://59199m.com" target="_blank">亚洲破处大片</a>| <a href="http://lovehefei.com" target="_blank">欧美一区2区三区4区公司二百</a>| <a href="http://heyzo1031.com" target="_blank">久久五月婷婷丁香社区</a>| <a href="http://329aaa.com" target="_blank">99国产精品久久久久老师</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>