锘??xml version="1.0" encoding="utf-8" standalone="yes"?>麻豆av一区二区三区,欧美老女人xx,欧美一区二区日韩一区二区http://www.shnenglu.com/sunkehappy/zh-cnTue, 18 Nov 2025 06:08:37 GMTTue, 18 Nov 2025 06:08:37 GMT60zoj1405_Tanning Salonhttp://www.shnenglu.com/sunkehappy/archive/2009/08/07/92510.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Fri, 07 Aug 2009 03:50:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/08/07/92510.htmlhttp://www.shnenglu.com/sunkehappy/comments/92510.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/08/07/92510.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/92510.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/92510.html        鍦?1 ABAB  榪欑粍鏁版嵁涓婇敊浜嗭紝鏀硅繃鏉ヤ箣鍚庡氨榪囦簡錛屼笅涓嬈′竴瀹氳濂藉ソ璇婚銆?br>        榪欎竴嬈℃槸灝介噺鐢–++鏉ュ啓錛屽湪鐢╮find鍑芥暟鐨勬椂鍊欏嚭浜嗕竴鐐瑰皬闂錛屽簲璇ユ槸浠庤繖涓瓧絎﹀線鍓嶆帹涓浣嶅紑濮嬫煡鎵撅紝鑻ユ槸絎竴涓瓧絎︼紝灝變笉鑳借皟鐢ㄥ嚱鏁頒簡錛屼笉鐒跺氨浼氬嚭閿欍傛墍浠ュ氨澶氬姞浜嗕竴涓垽鏂紝褰卞搷浜嗙▼搴忕殑鍙鎬с備笅涓嬈¤鎵懼埌涓涓笉闇瑕佽繖鏍峰垽鏂殑鏂規(guī)硶銆?br>
#include<iostream>
#include
<string>
#define DEBUG 1
using namespace std ;

const int cap = 33 ;

char salon[cap] ;
string in ;

int check( int avai )
{
    
int i, j, pos(-1), flag, away(0) ;
    
for( i=0; i<in.size(); ++i ){
        
if( i >= 1 )
            pos 
= in.rfind( in[i], i ) ;
        
if( pos >= 0 ){
            flag 
= 0 ;
            
for( j=0; j<avai; ++j ){
                
if( salon[j] == in[i] ){
                    salon[j] 
= '\0' ;
                    flag 
= 1 ;
                    
break ;
                }

            }

            
if!flag )    {
                
for( j=0; j<avai; ++j ){
                    
if!salon[j] ){
                        flag 
= 1 ;
                        
break ;
                    }

                }

            }

            
if!flag )
                
++away ;
        }

        
else{
            
for( j=0; j<avai; ++j ){
                
if!salon[j] ){
                    salon[j] 
= in[i] ;
                    
break ;
                }

            }

        }

    }

    
return away ;
}


void output( int away )
{
    
if( away )
        cout 
<< away << " customer(s) walked away." << endl ;
    
else
        cout 
<< "All customers tanned successfully." << endl ;
}


int main( )
{
    
#if DEBUG
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\in.in","r",stdin) ;
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\out.out","w",stdout) ;
    
#endif

    
int avai, away ;
    
while( cin >> avai ){
        
if( avai == 0 )
            
break ;
        cin 
>> in ;
        away 
= check( avai ) ;
        output( away ) ;
    }
    
    
return 0 ;
}



]]>
zoj1002 Fire Nethttp://www.shnenglu.com/sunkehappy/archive/2009/07/26/91255.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Sun, 26 Jul 2009 09:33:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/07/26/91255.htmlhttp://www.shnenglu.com/sunkehappy/comments/91255.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/07/26/91255.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/91255.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/91255.html        濂戒箙閮芥病鏈夊啓瑙i鎬葷粨浜嗭紝鎵嬬敓浜嗐傛姄绱ф椂闂村仛棰橈紝涓嶇劧絳夊埌寮瀛︿簡錛屽氨涓嶈兘榪欎箞鐖界殑鍋氶浜嗐?/font>

        榪欎釜棰樻暟鎹噺涓嶅ぇ錛屽彲浠ョ敤鍥炴函銆傚垰寮濮嬪仛鐨勬椂鍊欙紝鏄敤騫挎悳錛屼絾鏄啓璧鋒潵瓚呴夯鐑︼紝浠g爜閲忔瀬澶э紝寰堝鏄撳嚭閿欍傚弬鑰冧簡澶х墰浠殑鍋氭硶錛屾墠鎯寵搗鏉ュ拰N鐨囧悗闂寰堝儚銆傛垜浠彲浠ヤ粠涓涓偣鍑哄彂錛岀劧鍚庡線鍙充笅鎵╂暎錛屾墿鏁e畬浜嗕箣鍚庯紝鍐嶅洖婧紝鍐嶆墿鏁?#8230;… 闂瑙e喅銆?/font>

#include<iostream>
#define DEBUG 0
using namespace std ;

int n, maxi ;
char a[5][5] ;

bool legal( int x, int y )
{
    
int i, j ;
    
for( i=x-1; i>=0--i ){
        
if( a[i][y] == '@' )
            
return false ;
        
else if( a[i][y] == 'X' )
            
break ;
    }

    
for( j=y-1; j>=0--j ){
        
if( a[x][j] == '@' )
            
return false ;
        
else if( a[x][j] == 'X' )
            
break ;
    }

    
return true ;
}


void trace( int x, int y, int geshu )
{
    
if( x == n )
        maxi 
= maxi>geshu ? maxi:geshu ;
    
else{
        
if( y == n )
            trace( x
+10, geshu ) ;
        
else {
            
if( a[x][y]=='.' && legal( x, y ) ){
                
// 鍥炴函鏍囪 
                a[x][y] = '@' ;
                trace( x, y
+1, geshu+1 ) ;
                a[x][y] 
= '.' ;
            }

            trace( x, y
+1, geshu ) ;
        }

    }

}


int main()
{
    
#if DEBUG
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\in.in","r",stdin) ;
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\out.out","w",stdout) ;
    
#endif

    
int i, j ;
    
while( cin >> n ){
        
if!n )
            
break ;
        
for( i=0; i<n; ++i ){
            
for( j=0; j<n; ++j ){
                cin 
>> a[i][j] ;
            }

        }

        maxi 
= 0 ;
        
// 浠?錛?寮濮嬪洖婧?nbsp;
        trace( 000 ) ;
        cout 
<< maxi << endl ;
    }

    
    
return 0 ;
}



]]>
hdu1016_Prime Ring Problemhttp://www.shnenglu.com/sunkehappy/archive/2009/06/05/86825.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Fri, 05 Jun 2009 02:55:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/06/05/86825.htmlhttp://www.shnenglu.com/sunkehappy/comments/86825.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/06/05/86825.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/86825.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/86825.html        綆鍗曡屼笖緇忓吀鐨勬悳绱㈤錛岀敤鍥炴函鍋氥傚浜庝粈涔堟槸鍥炴函浠涔堟槸DFS鎴戝垎涓嶆竻銆傚氨鏄寜浣嶉愪釜鍒ゆ柇錛岀洿鍒版壘鍒扮粨鏋滐紝鎴栬呭嚭鐣岄鍑恒?br>

#include<iostream>
#include
<cmath>
using namespace std ;
int n, a[111], k, ans[22], anscnt ;
int p[42]= {0,0,2,3,0,5,0,7,0,0,0,11,0,13,0,0,0,17,0,19,0,
           
0,0,23,0,0,0,0,0,29,0,31,0,0,0,0,0,37,0,0,0,41}
 ;

int rev[100][20], revcnt ;

void DFS( int m, int geshu )
{
    
int i, j ;
    
if( geshu == n && p[1+m] ){
        cout 
<< ans[0] ;
        
for( i=1; i<n; ++i ){
            cout 
<< " " << ans[i] ;
            rev[revcnt][i] 
= ans[i] ;
        }

        
++revcnt ;
        cout 
<< "\n" ;
    }

    
else if( geshu == n )
        
return ;
    
for( j=2; j<=n; ++j ){
        
if( j<p[j+m] && !a[j] ){
            a[j] 
= 1 ;
            ans[geshu] 
= j ;
            DFS( j, geshu
+1 ) ;
            a[j] 
= 0 ;
        }

    }

}


int main( )
{
    
int i, j ;
    
for( j=1; cin >> n; ++j ){
        cout 
<< "Case "<< j << ":\n" ;
        
for( i=0; i<111++i )
            a[i] 
= 0 ;
        revcnt 
= 0 ;
        k 
= 1 ;
        ans[
0= 1 ;
        anscnt 
= 1 ;
        DFS( 
11 ) ;
        cout 
<< "\n";
    }

    
return 0 ;
}



]]>
hdu2303_The Embarrassed Cryptographerhttp://www.shnenglu.com/sunkehappy/archive/2009/05/30/86175.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Sat, 30 May 2009 07:38:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/05/30/86175.htmlhttp://www.shnenglu.com/sunkehappy/comments/86175.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/05/30/86175.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/86175.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/86175.html        濂藉嚑澶╅兘娌℃湁鍒烽浜嗭紝蹇冮噷濂界儲韜佸晩錛?/font>

        浠婂ぉ緇堜簬鍙堝仛浜嗕竴涓笉鏄緢姘寸殑棰樼洰錛屾暟璁虹殑錛屽ぇ鏁存暟鍙栦綑錛岀洿鎺ユ毚鍔涜繃浜嗐傚叾涓張瀛︿簡涓縐嶇礌鏁扮殑絳涢夋硶錛屾晥鐜囨瘮鎴戜互鍓嶇敤鐨勬柟娉曢兘瑕侀珮銆備粬涓嶈綆楋紝鍙槸絳涢夈傝繖鏍蜂竴鏉ユ晥鐜囧氨楂樹簡寰堝銆傝繕鏈変竴涓湴鏂癸紝灝辨槸澶ф暣鏁扮殑鍙栦綑錛屼粠楂樹綅錛屽埌浣庝綅錛岃竟涔樿竟鍙栦綑錛屾牴鎹殑鏄悓浣欏畾鐞嗐?/font>


#include <stdio.h>
#include 
<string.h>
#include 
<stdlib.h>

int p[1000000] ;
char pr[1000000] ;
int len, pnum, num[14] ;

void prime( )
{
    
int i, j ;
    
// 絳涢夌礌鏁?nbsp;
    for( i=2; i<1000000++i ){
        pr[i] 
= 1 ;
    }

    
for( i=2,pnum=0; i<1000000++i ){
        
if( pr[i] ){
            p[pnum
++= i ;
            
for( j=i+i; j<1000000; j+=i )
                pr[j] 
= 0 ;
        }

    }

}


int mod( int n )
{
    __int64 m
=0 ;
    
int i ;
    
// 姹備綑鏁?nbsp;
    for( i=len-1; i>=0--i ){
        m 
= ( m*100000000+num[i] ) % n ;
    }

    
return m ;
}


int main()
{
    
char a[111] ;
    
int i, j, div, flag ;
    
    prime( ) ;
    
    
while( scanf("%s%d", a, &div ) && div && a[0]!='0' ){
        len 
= strlen( a ) ;
        
for( i=0; i<14++i )
            num[i] 
= 0 ;
        
for( i=0; i<len; ++i ){
            
//閫竴浜胯繘浣?nbsp;
            j = (len+7-i) / 8 - 1 ;
            num[j] 
= num[j]*10 + a[i]-'0' ;
        }

        len 
= (len+7)/8 ;
        flag 
= 1 ;
        
for( i=0; p[i]<div && i<pnum; ++i ){
            
if( mod( p[i] ) == 0 ){
                flag 
= 0 ;
                
break ;
            }

        }

        
if( flag )
            printf(
"GOOD\n") ;
        
else
            printf(
"BAD %d\n", p[i] ) ;
    }

    system(
"pause");
    
return 0 ;
}



]]>
hdu2048閿欐帓鐨勬鐜?/title><link>http://www.shnenglu.com/sunkehappy/archive/2009/05/22/83629.html</link><dc:creator>紲濅綘濂借繍錛?/dc:creator><author>紲濅綘濂借繍錛?/author><pubDate>Thu, 21 May 2009 16:02:00 GMT</pubDate><guid>http://www.shnenglu.com/sunkehappy/archive/2009/05/22/83629.html</guid><wfw:comment>http://www.shnenglu.com/sunkehappy/comments/83629.html</wfw:comment><comments>http://www.shnenglu.com/sunkehappy/archive/2009/05/22/83629.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunkehappy/comments/commentRss/83629.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunkehappy/services/trackbacks/83629.html</trackback:ping><description><![CDATA[<p><font size=3>          搴旇璇存槸涓涓函鏁板鐨勯鐩紝鑰冨療閿欐帓鐨勬鐜囥?/font></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdio.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000"> DEBUG 1</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_46_523_Open_Image onclick="this.style.display='none'; Codehighlighter1_46_523_Open_Text.style.display='none'; Codehighlighter1_46_523_Closed_Image.style.display='inline'; Codehighlighter1_46_523_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_46_523_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_46_523_Closed_Text.style.display='none'; Codehighlighter1_46_523_Open_Image.style.display='inline'; Codehighlighter1_46_523_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_46_523_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_46_523_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">#if</span><span style="COLOR: #000000"> DEBUG</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    freopen(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">C:\\Documents and Settings\\Administrator\\妗岄潰\\in.in</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">r</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,stdin) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    freopen(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">C:\\Documents and Settings\\Administrator\\妗岄潰\\out.out</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">w</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,stdout) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">#endif</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    __int64 i, n, sets, s, fenmu ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> p, temp ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%I64d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">sets ) ;<br><img id=Codehighlighter1_343_521_Open_Image onclick="this.style.display='none'; Codehighlighter1_343_521_Open_Text.style.display='none'; Codehighlighter1_343_521_Closed_Image.style.display='inline'; Codehighlighter1_343_521_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_343_521_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_343_521_Closed_Text.style.display='none'; Codehighlighter1_343_521_Open_Image.style.display='inline'; Codehighlighter1_343_521_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">( sets</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000"> )</span><span id=Codehighlighter1_343_521_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_343_521_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%I64d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">n ) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        p </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        s </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        fenmu </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ;<br><img id=Codehighlighter1_426_485_Open_Image onclick="this.style.display='none'; Codehighlighter1_426_485_Open_Text.style.display='none'; Codehighlighter1_426_485_Closed_Image.style.display='inline'; Codehighlighter1_426_485_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_426_485_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_426_485_Closed_Text.style.display='none'; Codehighlighter1_426_485_Open_Image.style.display='inline'; Codehighlighter1_426_485_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">( i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">; i</span><span style="COLOR: #000000"><=</span><span style="COLOR: #000000">n; </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">i )</span><span id=Codehighlighter1_426_485_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_426_485_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            s </span><span style="COLOR: #000000">*=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            fenmu </span><span style="COLOR: #000000">*=</span><span style="COLOR: #000000"> i ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            p </span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000"> s</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000">)fenmu ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%.2lf%%\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, </span><span style="COLOR: #000000">100</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">p ) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <img src ="http://www.shnenglu.com/sunkehappy/aggbug/83629.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunkehappy/" target="_blank">紲濅綘濂借繍錛?/a> 2009-05-22 00:02 <a href="http://www.shnenglu.com/sunkehappy/archive/2009/05/22/83629.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hdu1465 閿欐帓http://www.shnenglu.com/sunkehappy/archive/2009/05/21/83616.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Thu, 21 May 2009 15:17:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/05/21/83616.htmlhttp://www.shnenglu.com/sunkehappy/comments/83616.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/05/21/83616.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/83616.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/83616.html         榪欎竴棰樺氨鏄崟綰殑鑰冨療閿欐帓錛屼篃灝辨槸鑰冨療閫掓帹銆?/font>

鍩烘湰褰㈠紡錛歞[1]=0;   d[2]=1
閫掑綊寮忥細d[n]= (n-1)*( d[n-1] + d[n-2])

榪欏氨鏄憲鍚嶇殑閿欐帓鍏紡

 

#include <stdio.h>
#define DEBUG 1
int main()
{
    
#if DEBUG
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\in.in","r",stdin) ;
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\out.out","w",stdout) ;
    
#endif

    __int64 i, n, s, geshu, a1, a2, temp ;
    
while( EOF != scanf("%I64d"&n ) ){
        a1 
= 0 ;
        a2 
= 1 ;
        
for( i=1; i<=n; ++i ){
            temp 
= a2 ;
            a2 
= (i-1* (a1+a2) ;
            a1 
= temp ;
        }

        printf(
"%I64d\n", a2 ) ;
    }

    
return 0 ;
}

 



]]>
zoj1951_Goldbach's Conjecturehttp://www.shnenglu.com/sunkehappy/archive/2009/05/12/82703.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Tue, 12 May 2009 09:03:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/05/12/82703.htmlhttp://www.shnenglu.com/sunkehappy/comments/82703.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/05/12/82703.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/82703.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/82703.html
#include <stdio.h>
#include 
<math.h>
#define DEBUG 1
short a[1000000] ;
int main()
{
    
#if DEBUG
     freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\in.txt","r",stdin);
     freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\out.txt","w",stdout);
     
#endif
    
int i, j, n, flag ;
    
double temp ;
    
for( i=2; i<1000000++i ){
        
if( a[i] )
            
continue ;
        
for( j=i; j<1000000; j+=i )
            a[j] 
= 1 ;
        temp 
= sqrt( i ) ;
        flag 
= 1 ;
        
for( j=2; j<=temp; ++j ){
            
if( i%== 0 ){
                flag 
= 0 ;
                
break ;
            }

        }

        
if( flag )
            a[i] 
= 0 ;
    }

    
while( scanf("%d"&n ) && n ){
        
for( i=3; i<n; i+=2 ){
            
if!a[i] && !a[n-i] ){
                printf(
"%d = %d + %d\n", n, i, n-i ) ;
                
break ;
            }

        }

    }

    
return 0 ;
}



]]>
hdu2816_I Love You Toohttp://www.shnenglu.com/sunkehappy/archive/2009/05/11/82551.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Mon, 11 May 2009 04:48:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/05/11/82551.htmlhttp://www.shnenglu.com/sunkehappy/comments/82551.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/05/11/82551.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/82551.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/82551.html闃呰鍏ㄦ枃

]]>
hdu1181鍙樺艦璇?/title><link>http://www.shnenglu.com/sunkehappy/archive/2009/05/10/82506.html</link><dc:creator>紲濅綘濂借繍錛?/dc:creator><author>紲濅綘濂借繍錛?/author><pubDate>Sun, 10 May 2009 11:48:00 GMT</pubDate><guid>http://www.shnenglu.com/sunkehappy/archive/2009/05/10/82506.html</guid><wfw:comment>http://www.shnenglu.com/sunkehappy/comments/82506.html</wfw:comment><comments>http://www.shnenglu.com/sunkehappy/archive/2009/05/10/82506.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunkehappy/comments/commentRss/82506.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunkehappy/services/trackbacks/82506.html</trackback:ping><description><![CDATA[        鍏稿瀷鐨凢loyd浼犻掗棴鍖咃紝鍙鐭ラ亾浜嗙畻娉曪紝鍋氳搗鏉ュ拰綆鍗曘?br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdio.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">memory.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000"> DEBUG 1</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> N</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">28</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> map[N][N] ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> Floyd( )<br><img id=Codehighlighter1_123_265_Open_Image onclick="this.style.display='none'; Codehighlighter1_123_265_Open_Text.style.display='none'; Codehighlighter1_123_265_Closed_Image.style.display='inline'; Codehighlighter1_123_265_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_123_265_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_123_265_Closed_Text.style.display='none'; Codehighlighter1_123_265_Open_Image.style.display='inline'; Codehighlighter1_123_265_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_123_265_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_123_265_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i, j, k ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">( k</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">; k</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">26</span><span style="COLOR: #000000">; </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">k )<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">( i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">; i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">26</span><span style="COLOR: #000000">; </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">i )<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">( j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">; j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">26</span><span style="COLOR: #000000">; </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">j )<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        map[i][j] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> map[i][j] </span><span style="COLOR: #000000">||</span><span style="COLOR: #000000"> ( map[i][k] </span><span style="COLOR: #000000">&&</span><span style="COLOR: #000000"> map[k][j] ) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_279_773_Open_Image onclick="this.style.display='none'; Codehighlighter1_279_773_Open_Text.style.display='none'; Codehighlighter1_279_773_Closed_Image.style.display='inline'; Codehighlighter1_279_773_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_279_773_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_279_773_Closed_Text.style.display='none'; Codehighlighter1_279_773_Open_Image.style.display='inline'; Codehighlighter1_279_773_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_279_773_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_279_773_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">#if</span><span style="COLOR: #000000"> DEBUG</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>     freopen(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">C:\\Documents and Settings\\Administrator\\妗岄潰\\in.txt</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">r</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,stdin);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>     freopen(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">C:\\Documents and Settings\\Administrator\\妗岄潰\\out.txt</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">w</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,stdout);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>     </span><span style="COLOR: #0000ff">#endif</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>     </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> len ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>     </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000"> a[</span><span style="COLOR: #000000">2000</span><span style="COLOR: #000000">] ;<br><img id=Codehighlighter1_535_759_Open_Image onclick="this.style.display='none'; Codehighlighter1_535_759_Open_Text.style.display='none'; Codehighlighter1_535_759_Closed_Image.style.display='inline'; Codehighlighter1_535_759_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_535_759_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_535_759_Closed_Text.style.display='none'; Codehighlighter1_535_759_Open_Image.style.display='inline'; Codehighlighter1_535_759_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>     </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">( EOF </span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000"> scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%s</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,a) )</span><span id=Codehighlighter1_535_759_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_535_759_Open_Text><span style="COLOR: #000000">{<br><img id=Codehighlighter1_556_698_Open_Image onclick="this.style.display='none'; Codehighlighter1_556_698_Open_Text.style.display='none'; Codehighlighter1_556_698_Closed_Image.style.display='inline'; Codehighlighter1_556_698_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_556_698_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_556_698_Closed_Text.style.display='none'; Codehighlighter1_556_698_Open_Image.style.display='inline'; Codehighlighter1_556_698_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">( a[</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">] </span><span style="COLOR: #000000">==</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"> )</span><span id=Codehighlighter1_556_698_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_556_698_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            Floyd( ) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">( map[</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">][</span><span style="COLOR: #000000">12</span><span style="COLOR: #000000">] )<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Yes.\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">No.\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            memset( map, </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">, </span><span style="COLOR: #0000ff">sizeof</span><span style="COLOR: #000000">(map) ) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">continue</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        len </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> strlen( a ) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        map[a[</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">][a[len</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <img src ="http://www.shnenglu.com/sunkehappy/aggbug/82506.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunkehappy/" target="_blank">紲濅綘濂借繍錛?/a> 2009-05-10 19:48 <a href="http://www.shnenglu.com/sunkehappy/archive/2009/05/10/82506.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>zoj1092_Arbitragehttp://www.shnenglu.com/sunkehappy/archive/2009/05/08/82200.html紲濅綘濂借繍錛?/dc:creator>紲濅綘濂借繍錛?/author>Thu, 07 May 2009 16:47:00 GMThttp://www.shnenglu.com/sunkehappy/archive/2009/05/08/82200.htmlhttp://www.shnenglu.com/sunkehappy/comments/82200.htmlhttp://www.shnenglu.com/sunkehappy/archive/2009/05/08/82200.html#Feedback0http://www.shnenglu.com/sunkehappy/comments/commentRss/82200.htmlhttp://www.shnenglu.com/sunkehappy/services/trackbacks/82200.html       瀵逛簬榪欎竴棰橈紝鍙鑳藉鎵懼埌涓涓《鐐癸紝璁╀粬鐨勫兼瘮1澶э紝灝辮鏄庡彲浠ラ挶鐢熼挶銆?br>
#include <stdio.h>
#include 
<string.h>
#include 
<memory.h>
#define DEBUG 1
int n ;
char mo[31][30] ;
double map[31][31] ; 

int Find( char *t )
{
    
int i ;
    
for( i=1; i<=n; ++i )
        
if!strcmp( mo[i], t ) )
            
return i ;
}


void Floyd( )
{
    
int i, j, k ;
    
for( k=1; k<=n; ++k )
        
for( i=1; i<=n; ++i )
            
for( j=1; j<=n; ++j )
                
if( map[i][j] < map[i][k]*map[k][j] )
                    map[i][j] 
= map[i][k]*map[k][j] ;
}


void In( )
{
    
int i, x, y, sets ;
    
char a[30], b[30] ;
    
double rate ;
    
for( i=1; i<=n; ++i )
           scanf(
"%s", mo[i] ) ;
    scanf(
"%d"&sets ) ;
    
for( i=1; i<=sets; ++i ){
        scanf(
"%s %lf %s", a, &rate, b ) ;
        x 
= Find( a ) ;
        y 
= Find( b ) ;
        map[x][y] 
= rate ;
    }

}


void Judge( )
{
    
int flag, i ;
    flag 
= 0 ;
    
for( i=1; i<=n; ++i ){
        
if( map[i][i] >= 1 ){
            flag 
= 1 ;
            
break ;
        }

    }

    
if( flag )
        printf(
"Yes\n") ;
    
else
        printf(
"No\n") ;    
}


int main()
{
    
#if DEBUG
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\in.in","r",stdin) ;
    freopen(
"C:\\Documents and Settings\\Administrator\\妗岄潰\\out.out","w",stdout) ;
    
#endif
    
    
int i ;
    
for( i=1; scanf("%d"&n) && n; ++i ){
        printf(
"Case %d: ", i ) ;
        memset( map, 
0sizeof(map) ) ;
        In( ) ;
        Floyd( ) ;
        Judge( ) ;
    }

    
return 0 ;
}


]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国产美女精品免费电影| 欧美丰满高潮xxxx喷水动漫| 国产模特精品视频久久久久 | 国内精品久久久久影院 日本资源| 国产精品午夜国产小视频| 欧美日韩情趣电影| 欧美婷婷久久| 国产精品一区免费观看| 国产亚洲毛片在线| 悠悠资源网久久精品| 亚洲激情国产精品| 亚洲最新色图| 久久国产天堂福利天堂| 你懂的亚洲视频| 亚洲精品亚洲人成人网| 亚洲午夜国产成人av电影男同| 亚洲专区一区二区三区| 久久蜜臀精品av| 欧美人体xx| 国产真实精品久久二三区| 国产精品人人做人人爽人人添 | 国产一区二区黄色| 国产精品久久久久免费a∨大胸| 欧美一区二区高清| 久久精品免费| 蘑菇福利视频一区播放| 亚洲欧洲一区二区三区在线观看| 亚洲高清一区二区三区| 亚洲欧美日韩第一区| 麻豆成人小视频| 国产精品久久久久久户外露出| 国模私拍视频一区| 亚洲一区二区免费视频| 蜜臀av国产精品久久久久| 中文国产成人精品久久一| 午夜精品理论片| 亚洲精品一区在线| 国产精品福利av| 在线看欧美日韩| 性高湖久久久久久久久| 亚洲福利国产| 久久精品一区二区三区四区| 国产精品福利网站| 日韩亚洲成人av在线| 玖玖玖免费嫩草在线影院一区| 亚洲午夜一区二区三区| 欧美日本高清| 亚洲毛片av| 欧美激情一区二区三级高清视频 | 久久精品中文字幕一区二区三区 | 亚洲国产三级| 久久视频一区| 性欧美video另类hd性玩具| 欧美日韩在线免费| 夜夜爽99久久国产综合精品女不卡| 久久伊伊香蕉| 久久精品成人欧美大片古装| 夜夜爽夜夜爽精品视频| 欧美成人高清| 欧美1区3d| 亚洲毛片在线看| 91久久精品国产91久久性色| 欧美大片在线观看一区二区| 最新国产成人在线观看| 亚洲福利视频在线| 欧美激情a∨在线视频播放| 91久久在线观看| 亚洲精品久久久一区二区三区| 欧美二区在线播放| 一本大道av伊人久久综合| 日韩视频免费在线| 国产精品第十页| 久久精品视频网| 免费久久99精品国产| 99国产精品久久| 99天天综合性| 国产日韩欧美三区| 亚洲国产高清在线| 欧美国产一区二区在线观看| 欧美aⅴ一区二区三区视频| 亚洲精品日韩一| 一本色道久久综合精品竹菊| 国产精品视频一区二区高潮| 久久久人人人| 欧美精品一区二区三区蜜桃 | 亚洲国产精品福利| 亚洲欧洲精品一区二区三区波多野1战4 | 国产精品第一页第二页第三页| 欧美一级在线播放| 久久久99国产精品免费| 99精品欧美一区二区三区综合在线 | 久久爱www久久做| 久久综合色天天久久综合图片| 日韩一区二区精品葵司在线| 亚洲自拍偷拍视频| 亚洲第一黄色网| 亚洲午夜在线观看| 亚洲精品护士| 欧美午夜电影网| 欧美成人免费大片| 欧美激情 亚洲a∨综合| 欧美黄在线观看| 久久成人一区| 欧美成人一区在线| 欧美一区二区日韩一区二区| 久久婷婷成人综合色| 亚洲女人天堂成人av在线| 久久久久综合网| 欧美一区二区三区婷婷月色 | 亚洲午夜精品视频| 久久精品国产精品亚洲综合 | 在线欧美福利| 亚洲一区二区三区精品在线| 久久先锋影音av| 欧美亚洲免费高清在线观看| 亚洲国产精品小视频| 亚洲中午字幕| 在线视频欧美精品| 久久免费精品视频| 午夜精品成人在线视频| 欧美/亚洲一区| 久久在线免费视频| 亚洲午夜一区二区| 日韩一区二区免费看| 狼人天天伊人久久| 久久久久国产成人精品亚洲午夜| 欧美日韩二区三区| 亚洲国产另类精品专区| 国模套图日韩精品一区二区| 亚洲私人黄色宅男| 一本久久精品一区二区| 老司机一区二区| 欧美14一18处毛片| 一区二区在线观看av| 久久手机免费观看| 香蕉国产精品偷在线观看不卡| 欧美日韩国产一区二区三区地区 | 欧美激情中文字幕在线| 红桃视频亚洲| 久久久国际精品| 欧美+亚洲+精品+三区| 激情综合电影网| 久久色在线播放| 欧美激情亚洲精品| 日韩一区二区精品在线观看| 欧美成人精品三级在线观看 | 午夜精品久久久久久久99黑人| 性欧美长视频| 国产有码一区二区| 久久午夜激情| 91久久精品美女高潮| 99视频精品全部免费在线| 欧美日韩亚洲一区二区三区在线观看| 99re成人精品视频| 欧美在线3区| 精品av久久707| 欧美成人免费小视频| 亚洲肉体裸体xxxx137| 亚洲视频在线观看视频| 欧美手机在线视频| 欧美亚洲网站| 亚洲电影激情视频网站| 99热精品在线| 国产婷婷精品| 欧美黑人一区二区三区| 国产精品99久久久久久宅男| 久久激情网站| 日韩午夜剧场| 国产网站欧美日韩免费精品在线观看| 久久精品一区二区三区不卡| 亚洲日本成人网| 久久成人亚洲| 一区二区三区四区五区在线| 国产情侣一区| 欧美片在线观看| 久久精品日韩一区二区三区| 亚洲精品激情| 麻豆9191精品国产| 亚洲一区二区精品在线| 亚洲第一二三四五区| 国产精品日韩精品欧美在线| 噜噜噜噜噜久久久久久91| 亚洲永久在线观看| 亚洲国产天堂久久综合网| 久久精品国产亚洲高清剧情介绍| 日韩视频专区| 老牛影视一区二区三区| 亚洲最新视频在线| 女人天堂亚洲aⅴ在线观看| 亚洲午夜电影| 免费在线欧美黄色| 欧美在线视频不卡| 亚洲视频国产视频| 亚洲欧洲日本mm| 欧美激情一区三区| 久久综合福利| 久久精品人人做人人爽电影蜜月| 亚洲无线观看| 一区二区三区视频在线| 亚洲免费观看高清完整版在线观看熊|