锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩系列在线,久久青草久久,亚洲欧美日韩精品一区二区http://www.shnenglu.com/cdy20/category/8468.html鍕囨暍.鍧氭瘏.鏅烘収zh-cnMon, 30 Mar 2009 18:33:46 GMTMon, 30 Mar 2009 18:33:46 GMT60瑙i鎶ュ憡http://www.shnenglu.com/cdy20/archive/2009/03/29/78251.htmlcdy20cdy20Sun, 29 Mar 2009 04:39:00 GMThttp://www.shnenglu.com/cdy20/archive/2009/03/29/78251.htmlhttp://www.shnenglu.com/cdy20/comments/78251.htmlhttp://www.shnenglu.com/cdy20/archive/2009/03/29/78251.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/78251.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/78251.html闃呰鍏ㄦ枃

cdy20 2009-03-29 12:39 鍙戣〃璇勮
]]>
pku 1149 PIGShttp://www.shnenglu.com/cdy20/archive/2009/02/25/74920.htmlcdy20cdy20Wed, 25 Feb 2009 13:46:00 GMThttp://www.shnenglu.com/cdy20/archive/2009/02/25/74920.htmlhttp://www.shnenglu.com/cdy20/comments/74920.htmlhttp://www.shnenglu.com/cdy20/archive/2009/02/25/74920.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/74920.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/74920.html娉ㄦ剰欏懼鐨勫厛鍚庢潯浠?
涓昏鏄緩鍥撅紝鐪嬩笉鎳傜殑璇濆彲浠ュ拰鎴戜氦嫻?nbsp; 闃呰鍏ㄦ枃

cdy20 2009-02-25 21:46 鍙戣〃璇勮
]]>
pku 1325 Machine Schedulehttp://www.shnenglu.com/cdy20/archive/2009/02/17/74049.htmlcdy20cdy20Tue, 17 Feb 2009 08:43:00 GMThttp://www.shnenglu.com/cdy20/archive/2009/02/17/74049.htmlhttp://www.shnenglu.com/cdy20/comments/74049.htmlhttp://www.shnenglu.com/cdy20/archive/2009/02/17/74049.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/74049.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/74049.html
璺熷墠闈㈠仛鐨勯鐩竴鏍楓?
寤虹珛涓涓猻t-緗?
s榪炰笂x鐨?y榪炰笂t
x->y
娉ㄦ剰鍘繪帀0-0鐘舵?nbsp; 闃呰鍏ㄦ枃

cdy20 2009-02-17 16:43 鍙戣〃璇勮
]]>
pku 1274 The Perfect Stallhttp://www.shnenglu.com/cdy20/archive/2009/02/15/73879.htmlcdy20cdy20Sun, 15 Feb 2009 08:18:00 GMThttp://www.shnenglu.com/cdy20/archive/2009/02/15/73879.htmlhttp://www.shnenglu.com/cdy20/comments/73879.htmlhttp://www.shnenglu.com/cdy20/archive/2009/02/15/73879.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/73879.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/73879.html浜屽垎鏈澶у尮閰?
鏈澶ф祦鐢? 鍖堢墮鍒?鎴栬呮渶澶ф祦錛堝緩鍥?婧愮偣s榪炰笂鎵鏈夌殑鐗涳紝鎵鏈夌殑媯氳繛涓婃眹鐐箃錛?nbsp; 闃呰鍏ㄦ枃

cdy20 2009-02-15 16:18 鍙戣〃璇勮
]]>
pku 1273 Drainage Ditcheshttp://www.shnenglu.com/cdy20/archive/2009/02/14/73793.htmlcdy20cdy20Sat, 14 Feb 2009 07:31:00 GMThttp://www.shnenglu.com/cdy20/archive/2009/02/14/73793.htmlhttp://www.shnenglu.com/cdy20/comments/73793.htmlhttp://www.shnenglu.com/cdy20/archive/2009/02/14/73793.html#Feedback1http://www.shnenglu.com/cdy20/comments/commentRss/73793.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/73793.htmlhttp://acm.pku.edu.cn/JudgeOnline/problem?id=1273  闃呰鍏ㄦ枃

cdy20 2009-02-14 15:31 鍙戣〃璇勮
]]>
鍏駭涓栫晫鐨勭礌鎻?/title><link>http://www.shnenglu.com/cdy20/archive/2008/12/15/69484.html</link><dc:creator>cdy20</dc:creator><author>cdy20</author><pubDate>Mon, 15 Dec 2008 04:46:00 GMT</pubDate><guid>http://www.shnenglu.com/cdy20/archive/2008/12/15/69484.html</guid><wfw:comment>http://www.shnenglu.com/cdy20/comments/69484.html</wfw:comment><comments>http://www.shnenglu.com/cdy20/archive/2008/12/15/69484.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/cdy20/comments/commentRss/69484.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/cdy20/services/trackbacks/69484.html</trackback:ping><description><![CDATA[<p class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(51,51,153); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"></span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </p> <p class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></p> <ul> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">緇忓吀鏂囨槑錛堢涓錛変笘鐣?nbsp;</span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">  灝嗘灝?/span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">甯?jìng)鍦航C句細(xì)涓諱箟錛堢浜岋級(jí)涓栫晫 </span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">緇忓吀鏂囨槑妯℃嫙涓栫晫錛堢涓夛級(jí)涓栫晫 </span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">  灝嗘澶?/span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">浼婃柉鍏幫紙絎洓錛変笘鐣?nbsp; </span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">         灝嗘渶澶?/span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">閮ㄨ惤鍩虹錛堢浜旓級(jí)涓栫晫 </span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"> </span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span> </div> </li> <li> <div id="hvzpftn" class=p0 style="MARGIN-TOP: 0pt; BACKGROUND: rgb(255,255,255); MARGIN-BOTTOM: 0pt; TEXT-ALIGN: left"><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">寰佹湇鍚庤錛堢鍏級(jí)涓栫晫</span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'">  鏈灝?/span><span style="FONT-SIZE: 10.5pt; BACKGROUND: rgb(255,255,255); VISIBILITY: visible; COLOR: rgb(0,0,0); FONT-FAMILY: '瀹?huà)浣?; mso-spacerun: 'yes'"><o:p></o:p></span></div> </li> </ul> <!--endfragment--> <img src ="http://www.shnenglu.com/cdy20/aggbug/69484.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/cdy20/" target="_blank">cdy20</a> 2008-12-15 12:46 <a href="http://www.shnenglu.com/cdy20/archive/2008/12/15/69484.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>pku 2253 Froggerhttp://www.shnenglu.com/cdy20/archive/2008/11/06/66170.htmlcdy20cdy20Thu, 06 Nov 2008 13:55:00 GMThttp://www.shnenglu.com/cdy20/archive/2008/11/06/66170.htmlhttp://www.shnenglu.com/cdy20/comments/66170.htmlhttp://www.shnenglu.com/cdy20/archive/2008/11/06/66170.html#Feedback6http://www.shnenglu.com/cdy20/comments/commentRss/66170.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/66170.htmlhttp://acm.pku.edu.cn/JudgeOnline/problem?id=2253


#include
<iostream>
#include
<cmath>
using namespace std;

#define MAXN 1002
#define inf 1000000000
typedef 
double elem_t;
elem_t mat[MAXN][MAXN];
elem_t dist[MAXN];
int num[MAXN][2];

double distance(int a1,int a2,int b1,int b2)
{
       
return sqrt((double)((a1-b1)*(a1-b1)+(a2-b2)*(a2-b2)));
}

void dijkstra(int n,int s)
{
    
int v[MAXN],i,j;
    
int k;
    
for (i=0;i<n;i++)
        dist[i]
=mat[s][i],v[i]=0;//鍒濆鍖?/span>
    
    
for (dist[s]=0,j=0;j<n;j++){

        
for (k=-1,i=0;i<n;i++)//浼拌璁¤窛紱繪渶灝忕殑欏剁偣k
            if (!v[i]&&(k==-1||dist[i] < dist[k]))
                k
=i;

        
for (v[k]=1,i=0;i<n;i++)
            
if (!v[i] && mat[k][i]>0.0)//&& max(dist[k],mat[k][i]) > dist[i])
                {
                     dist[i] 
= min( max(dist[k],mat[k][i]),dist[i]);
                     
                  
//dist[i]=min(dist[k],mat[k][i]);
               }


    }

}


int main()
{
    
    
int n,m,k,x1,y1;
    
    
    
    
for(int i = 1;;i ++){
      scanf(
"%d",&n);
      
if( n == 0)break;
       memset(mat,
0,sizeof(mat));
       
forint j=0;j<n;j++)
         scanf(
"%d %d",&num[j][0],&num[j][1]);
       
forint k=0;k<n;k++)
         
forint j=0;j<n;j++){
            mat[k][j]
=distance(num[k][0],num[k][1],num[j][0],num[j][1]);     
         }


       

       dijkstra(n,
0);

       printf(
"Scenario #%d\n",i);
       printf(
"Frog Distance = %0.3lf\n\n",dist[1]);//dist[n-1]<<endl<<endl;
    }


    
return 0;
}


/*
1
3 3
1 2 3
1 3 4
2 3 5

*/



cdy20 2008-11-06 21:55 鍙戣〃璇勮
]]>
pku 1797Heavy Transportationhttp://www.shnenglu.com/cdy20/archive/2008/11/06/66159.htmlcdy20cdy20Thu, 06 Nov 2008 12:02:00 GMThttp://www.shnenglu.com/cdy20/archive/2008/11/06/66159.htmlhttp://www.shnenglu.com/cdy20/comments/66159.htmlhttp://www.shnenglu.com/cdy20/archive/2008/11/06/66159.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/66159.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/66159.html/*
    璧風(fēng)偣鍒皀鐐?nbsp;璺緞涓?nbsp; 鎵鑳芥壙鍙楃殑 鏈澶ч噸閲忕殑杞?br>       
    dist[k]   婧愮偣鍒発 璺緞涓渶灝忕殑閭d釜杈規(guī)潈鍊?nbsp;  mat[k][i]杈筴-i鏉冨?nbsp; 
   鍙栬礬寰?nbsp;dist[k]  鍜宮at銆恔銆戙恑銆戣竟鏈澶ч偅涓?nbsp; 鏇存柊 dist[i]
    
*/


#include
<iostream>
using namespace std;

#define MAXN 1002
#define inf 1000000000
typedef 
int elem_t;
int mat[MAXN][MAXN];
int dist[MAXN];

void dijkstra(int n,int s)
{
    
int v[MAXN],i,j,k;
    
for (i=0;i<n;i++)
        dist[i]
=mat[s][i],v[i]=0;//鍒濆鍖?/span>
    
    
for (dist[s]=0,j=0;j<n;j++){

        
for (k=-1,i=0;i<n;i++)//浼拌璁¤窛紱繪渶灝忕殑欏剁偣k
            if (!v[i]&&(k==-1||dist[i] > dist[k]))
                k
=i;

        
for (v[k]=1,i=0;i<n;i++)
            
if (!v[i] && mat[k][i]>0&& min(dist[k],mat[k][i]) > dist[i])
                
{
                  dist[i]
=min(dist[k],mat[k][i]);
               }


    }

}


int main()
{
    
int cases;
    
int n,m,k,x1,y1;
    
    cin
>>cases;
    
    
for(int i = 1;i <= cases;i ++){
       cin
>>n>>m;
    
       memset(mat,
0,sizeof(mat));
    

       
for(int j=0;j<m;j++){   
          
          cin
>>x1>>y1>>k;
          
          mat[x1
-1][y1-1]=k;
          mat[y1
-1][x1-1]=k;

       dijkstra(n,
0);

       cout
<<"Scenario #"<<i<<":"<<endl;
       cout
<<dist[n-1]<<endl<<endl;
    }


    
return 0;
}


/*
1
3 3
1 2 3
1 3 4
2 3 5

*/


http://acm.pku.edu.cn/JudgeOnline/problem?id=1797


cdy20 2008-11-06 20:02 鍙戣〃璇勮
]]>
pku 2485 Highwayshttp://www.shnenglu.com/cdy20/archive/2008/10/26/65079.htmlcdy20cdy20Sun, 26 Oct 2008 05:16:00 GMThttp://www.shnenglu.com/cdy20/archive/2008/10/26/65079.htmlhttp://www.shnenglu.com/cdy20/comments/65079.htmlhttp://www.shnenglu.com/cdy20/archive/2008/10/26/65079.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/65079.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/65079.htmlhttp://acm.pku.edu.cn/JudgeOnline/problem?id=2485
鏈灝忕敓鎴愭爲(wèi)鏈闀胯竟錛岃鏁伴噺涓嶈璐ㄩ噺錛岀┖铏氱殑棰樼洰緇忛獙錛?555
#include<iostream>
using namespace std;
int n;
#define MAXN 501
#define inf 65537
int map[MAXN][MAXN];//visited[N];
typedef int  elem_t;

elem_t prim(
int n,elem_t mat[][MAXN]){
    elem_t min[MAXN],ret
=0;
    
int v[MAXN],i,j,k;
    
for (i=0;i<n;i++)
        min[i]
=inf,v[i]=0;
        
    
for (min[j=0]=0;j<n;j++){
        
for (k=-1,i=0;i<n;i++)
            
if (!v[i]&&(k==-1||min[i]<min[k]))
                k
=i;
                
        
for (v[k]=1,ret+=min[k],i=0;i<n;i++)
            
if (!v[i]&&mat[k][i]<min[i])
                min[i]
=mat[k][i];
    
    }
    
int max=0;
    
for(int i=0;i<n;i++){ //鎵炬渶澶ц竟鏉?nbsp;
        if(max<min[i])max=min[i];
     }
     
return max;
    
//return ret;
}

int main()
{
   
// ifstream fcin("agrinet.in");
  
//  ofstream fcout("agrinet.out");
    int  i,j,k,sum=0,node;
    
int dist;
    
int cas;
    scanf(
"%d",&cas);
    
while( cas -- ){ 
           
         scanf(
"%d",&n);            
       
         memset( map,inf, 
sizeof(map));
         
         
for( i=0;i<n;i++)
          
for( j=0;j<n;j++){
            scanf(
"%d",&map[i][j]);
  
      }
   
         printf(
"%d\n",prim(n,map));
     }
//system("pause");
     
    
return 0;





cdy20 2008-10-26 13:16 鍙戣〃璇勮
]]>
pku 1789 Truck Historyhttp://www.shnenglu.com/cdy20/archive/2008/10/11/63745.htmlcdy20cdy20Sat, 11 Oct 2008 08:58:00 GMThttp://www.shnenglu.com/cdy20/archive/2008/10/11/63745.htmlhttp://www.shnenglu.com/cdy20/comments/63745.htmlhttp://www.shnenglu.com/cdy20/archive/2008/10/11/63745.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/63745.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/63745.html#include<iostream>
using namespace std;
#define maxn 2001
int cost[maxn];//璁板綍鏉冨肩殑鏁扮粍
int used[maxn];//鍒ゆ柇鐐規(guī)槸鍚﹁闂繃
int graph[maxn][maxn];
char s[maxn][8];
int n;

int  solve()//鐢╬rime綆楁硶鐨勫嚱鏁?/span>
{
        
int  legth = 0;//鎬繪潈鍊?/span>

        
for(int ix = 0; ix < n; ix++)
        {
                cost[ix] 
= graph[0][ix];
                used[ix] 
= 0;
        }
        
        used[
0= 1;
        
for(;;)
        {
                
int j = 0, i = 0;
                
while(used[j] && j < n) 
                        j
++;//鎵句竴涓病璁塊棶鐨勭偣
                if(j == n) break;//濡傛灉閮借闂繃浜?jiǎn)锛岃窙_嚭寰幆
                for(i = 0; i < n; i++)
                        
if(!used[i] && cost[i] < cost[j]) 
                                j 
= i;//鍦ㄥ墿涓嬬殑鐐逛腑鎵懼埌鏉冨兼渶灝忕殑鐐癸紙鏉冨?br>//鏄寚璧峰鐐瑰埌姝ょ偣鐨勮礬寰勯暱搴︼級(jí)
                legth += cost[j];//鏇存柊鎬繪潈鍊?/span>
                used[j] =1;//灝嗘鐐圭疆涓鴻闂繃
                for(i = 0; i < n; i++)
                       
if(!used[i] && graph[j][i] < cost[i])
                 cost[i] 
= graph[j][i];//鏇存柊鏈闂殑鎵鏈夌偣鐨勬潈鍊?nbsp;                       
        }
   
// printf("%d\n",legth);
    return legth;
}

int main()
{
    
    
int i,j,sum;
    
while(cin>>n){
      
if( n == 0)break;
      
for( i=0;i<=n;i++){used[i]=0;cost[i]=0;}
      
      
for(i=0;i<n;i++ ){
        cin
>>s[i];
      }
      
for( i=0;i<n;i++)
       
for( j=0;j<n;j++){
         
if( i == j)graph[i][j]=0;
        
else {
          sum
=0;
          
forint k=0;k<7;k++){
           
if(s[i][k]!=s[j][k])sum++;
          }
          graph[i][j]
=sum;
        }
       }
      cout
<<"The highest possible quality is 1/"<<solve()<<"."<<endl;
       
    }
    
//system("pause");
    return 0;
}

浠婂ぉ絎竴涓竴ac鐨勯鐩?br>鏅曟
鐢╬rim鍋氱殑
閭eぉ錛屾垜鍙互寰楀績(jī)搴旀墜鐨?涓ac榪欎簺綆鍗曢鍟?br>鍔犳補(bǔ)錛佸偦鍌誨湴璐磋繖浜涙棤鑱婄殑涓滆タ銆?br>澶栧崠浠旇繕娌¢侀キ鏉ワ紒錛?br>wait銆傘傘傘傘傘傘傘?br>


cdy20 2008-10-11 16:58 鍙戣〃璇勮
]]>
pku 1175 Starry Nighthttp://www.shnenglu.com/cdy20/archive/2008/10/11/63740.htmlcdy20cdy20Sat, 11 Oct 2008 07:58:00 GMThttp://www.shnenglu.com/cdy20/archive/2008/10/11/63740.htmlhttp://www.shnenglu.com/cdy20/comments/63740.htmlhttp://www.shnenglu.com/cdy20/archive/2008/10/11/63740.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/63740.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/63740.html闃呰鍏ㄦ枃

cdy20 2008-10-11 15:58 鍙戣〃璇勮
]]>
pku 1258 agrinethttp://www.shnenglu.com/cdy20/archive/2008/10/11/63737.htmlcdy20cdy20Sat, 11 Oct 2008 07:22:00 GMThttp://www.shnenglu.com/cdy20/archive/2008/10/11/63737.htmlhttp://www.shnenglu.com/cdy20/comments/63737.htmlhttp://www.shnenglu.com/cdy20/archive/2008/10/11/63737.html#Feedback0http://www.shnenglu.com/cdy20/comments/commentRss/63737.htmlhttp://www.shnenglu.com/cdy20/services/trackbacks/63737.html 1 /*
 2  ID:dongyun1
 3  TASK:agrinet
 4  LANG: C++
 5 */
 6 #include<iostream>
 7 //#include<fstream>
 8 using namespace std;
 9 
10 #define N 101
11 int n;
12 int map[N][N],visited[N];
13 
14 
15 int main()
16 {
17    // ifstream fcin("agrinet.in");
18   //  ofstream fcout("agrinet.out");
19     int  i,j,k,sum=0,node;
20     int dist;
21     
22     while(scanf("%d",&n)!=EOF){ 
23      // while(cin>>n)  {          
24                         
25          memset(visited,0,sizeof( visited));
26          memset( map, 0sizeof(map));
27          
28          for( i=0;i<n;i++)
29           for( j=0;j<n;j++)
30             scanf("%d",&map[i][j]);
31             //cin>>map[i][j];
32          
33          sum=0;
34          visited[0]=1;
35         
36         for( i=1;i<n;i++){
37          dist=0
38          for(j=0;j<n;j++)
39              for( k=0;k<n;k++){
40                 if( map[j][k] && visited[j] && !visited[k]){//printf("AAAAA\n");
41                   if( dist == 0 || map[j][k]< dist){
42                     dist = map[j][k];
43                     node=k;
44                    // printf("tag\n");
45                   }
46                 }
47                }
48           visited[node]=1;
49           sum+=dist;
50          }
51          
52          
53         //cout<<sum<<endl;
54          printf("%d\n",sum);
55      }
56      //system("pause");
57      
58     return 0;
59 
60 /*
61 4
62 0 4 9 21
63 4 0 8 17
64 9 8 0 16
65 21 17 16 0
66 2
67 0 2
68 3 0
69 3
70 0 1 2
71 2 0 1
72 2 2 0
73 4
74 0 4 9 21
75 4 0 8 17
76 9 8 0 16
77 21 17 16 0
78 
79 
80 */
81  綆鍗曢 鏈灝忔垚鏍?br>

cdy20 2008-10-11 15:22 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美片在线观看| 在线播放中文字幕一区| 国产综合在线看| 亚洲国产欧美一区二区三区久久| 一区二区三区毛片| 久久久99久久精品女同性| 亚洲大黄网站| 亚洲影院在线观看| 久热精品在线| 国产精品久久国产精麻豆99网站| 极品少妇一区二区三区精品视频| av成人老司机| 久久亚洲私人国产精品va| 亚洲日本激情| 久久精品毛片| 国产精品v欧美精品v日韩| 伊大人香蕉综合8在线视| 亚洲午夜精品| 欧美福利视频在线观看| 亚洲免费在线视频| 欧美大片在线影院| 国产日韩欧美在线播放不卡| 99国产麻豆精品| 老鸭窝毛片一区二区三区| 中文高清一区| 欧美激情视频一区二区三区不卡| 国产一区二区三区久久久久久久久| 亚洲精品欧洲| 蜜臀久久99精品久久久画质超高清| 一区二区三区视频免费在线观看| 老色批av在线精品| 国产一区二区黄色| 亚洲欧美久久久| 最新国产成人av网站网址麻豆| 久久国产精品免费一区| 国产精品二区影院| 日韩一级片网址| 欧美大片免费观看| 久久国产精品一区二区三区| 国产精品视频久久久| 一区二区三区久久久| 欧美顶级艳妇交换群宴| 欧美一区二区三区视频| 国产精品日韩精品欧美在线| 一区二区三区欧美亚洲| 亚洲国产精选| 老司机一区二区三区| 韩国精品主播一区二区在线观看| 亚洲欧美国内爽妇网| 日韩视频中午一区| 欧美激情亚洲另类| 亚洲国产小视频在线观看| 久久天天狠狠| 久久er99精品| 韩国三级电影一区二区| 久久精品国产精品亚洲精品| 亚洲综合视频1区| 国产精品视频免费一区| 午夜精品在线视频| 亚洲小视频在线观看| 欧美午夜美女看片| 亚洲新中文字幕| 一区二区精品| 国产精品久久久久aaaa樱花| 亚洲永久免费| 亚洲午夜精品久久久久久浪潮| 欧美新色视频| 亚洲欧美日韩另类精品一区二区三区| 99视频精品全部免费在线| 欧美日韩视频| 亚洲一区中文| 亚洲女人小视频在线观看| 国产精品一级| 久久久999精品免费| 久久国产手机看片| 在线观看国产一区二区| 欧美国产日本韩| 欧美电影免费网站| 中文日韩欧美| 亚洲在线视频免费观看| 国产亚洲欧美日韩日本| 榴莲视频成人在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲精品国产精品国自产在线| 亚洲国产裸拍裸体视频在线观看乱了中文| 欧美大片在线观看一区| 亚洲私人影院| 亚洲欧美日韩一区二区三区在线观看 | 欧美成人r级一区二区三区| 亚洲激情偷拍| 妖精成人www高清在线观看| 国产精品乱码久久久久久| 久久精品国产第一区二区三区最新章节| 久久国产一区二区三区| 亚洲欧洲另类| 一本色道精品久久一区二区三区| 国产精品一区久久| 久久亚洲综合色| 欧美福利网址| 性欧美暴力猛交69hd| 久久精品青青大伊人av| 日韩系列欧美系列| 亚洲综合视频一区| **网站欧美大片在线观看| 亚洲精品自在在线观看| 国产欧美精品一区二区三区介绍| 免费看亚洲片| 欧美视频一区| 麻豆精品视频在线观看| 欧美日韩成人综合在线一区二区| 久久av红桃一区二区小说| 美日韩精品视频| 午夜精品免费视频| 免播放器亚洲一区| 亚洲欧美精品在线| 老司机午夜精品| 午夜久久电影网| 免费在线看成人av| 性久久久久久久| 欧美xx69| 欧美一区精品| 欧美精品一区二区久久婷婷| 久久成人精品无人区| 欧美精品久久久久久久| 久久电影一区| 欧美女同在线视频| 卡一卡二国产精品| 国产精品久久久久久久久| 欧美福利视频| 国产亚洲激情| 一本色道久久综合亚洲二区三区| 在线观看亚洲精品视频| 亚洲一区二三| 99国产精品久久久久久久久久 | 好吊视频一区二区三区四区| 91久久精品国产91久久性色tv| 国产亚洲女人久久久久毛片| 亚洲人成网站色ww在线| 狠狠综合久久av一区二区老牛| 99re6这里只有精品| 在线免费观看成人网| 亚洲免费在线精品一区| 99天天综合性| 美女任你摸久久| 久久久久久久精| 国产精品视频一区二区高潮| 亚洲人成网站在线观看播放| 在线观看国产成人av片| 性欧美1819sex性高清| 亚洲尤物在线| 欧美国产日本韩| 欧美www在线| 国内外成人免费激情在线视频网站| 亚洲视频日本| 亚洲性视频h| 欧美日本韩国一区| 亚洲国产精品久久久久婷婷老年 | 国产日韩精品一区二区三区| 夜夜爽www精品| 一本色道久久加勒比精品 | 一本大道久久a久久精二百| 久久综合激情| 麻豆成人精品| 黄页网站一区| 久久精品午夜| 久久躁狠狠躁夜夜爽| 国产亚洲欧美日韩美女| 午夜精品久久久久久久久久久| 亚洲永久精品大片| 国产精品theporn88| 一本一本久久a久久精品牛牛影视| 亚洲美女精品久久| 欧美高清视频在线播放| 亚洲国产高清aⅴ视频| 亚洲国产综合视频在线观看| 久久亚洲春色中文字幕| 欧美成人黑人xx视频免费观看| 亚洲第一级黄色片| 久久一区二区三区av| 欧美成年网站| 亚洲精品一区中文| 欧美精品色一区二区三区| 亚洲人成啪啪网站| 中日韩男男gay无套| 欧美经典一区二区三区| 亚洲美女一区| 亚洲自拍偷拍色片视频| 国产精品一二三四区| 欧美伊久线香蕉线新在线| 久久一区二区三区av| 亚洲国产精品久久久久久女王| 免费观看成人| 亚洲伦理久久| 午夜激情综合网| 国产亚洲欧美日韩日本| 久久亚洲不卡| 亚洲人成77777在线观看网| 亚洲午夜视频在线观看| 国产精品自拍视频| 久久爱www|