锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产天堂久久综合网站,久久美女人爽女人爽,99国产欧美久久久精品蜜芽http://www.shnenglu.com/yuziyu/category/11189.html姣忓ぉ榪涙涓鐐圭偣,Coding Everyday!zh-cnSat, 18 Jul 2009 01:28:37 GMTSat, 18 Jul 2009 01:28:37 GMT60[鍩虹綆楁硶澶嶄範]鍩烘暟鎺掑簭http://www.shnenglu.com/yuziyu/archive/2009/07/17/90382.htmlYZYYZYFri, 17 Jul 2009 11:49:00 GMThttp://www.shnenglu.com/yuziyu/archive/2009/07/17/90382.htmlhttp://www.shnenglu.com/yuziyu/comments/90382.htmlhttp://www.shnenglu.com/yuziyu/archive/2009/07/17/90382.html#Feedback0http://www.shnenglu.com/yuziyu/comments/commentRss/90382.htmlhttp://www.shnenglu.com/yuziyu/services/trackbacks/90382.html鍩烘暟鎺掑簭姣忎竴閬嶅寰呮帓鏁扮殑鏌愪竴浣嶈繘琛岃鏁版帓搴忥紝渚濇浠庢渶浣庝綅鍒版渶楂樹綅銆?br />涓嬮潰紼嬪簭鎶婇潪璐熸暟鎸?6榪涘埗澶勭悊錛屾瘡嬈″彇16榪涘埗鐨勪竴浣嶃傝繖鏍鋒瘮鐢?0榪涘埗鏂逛究蹇嵎寰堝銆?br />緙虹偣鏄笉鑳藉鐞嗚礋鏁般傚彲浠ュ皢鎵鏈夋暟閮藉鍔犱竴涓熀鏁版墍鍏舵垚涓烘鏁般傛帓搴忓畬鎴愬悗錛屽啀鍑忓幓榪欎釜鍩烘暟銆?br />浣嗘槸瀵逛簬32浣嶆渶灝忕殑璐熸暟1<<31榪欐牱涓涓壒渚嬶紝鏄笉琛岀殑銆?br />鐢ㄤ竴涓腑闂存暟緇勪繚瀛樹腑闂寸粨鏋滐紝姣忎竴閬嶆帓瀹屽悗錛屼氦鎹袱鎸囬拡錛岃繖鏍峰彲浠ラ伩鍏嶅嬈℃暟鎹鍒躲傜敱浜庝竴鍏辨湁8閬嶏紝緇撴潫鍚庯紝array涓負鏈鍚庝竴嬈℃帓瀹屽簭鐨勭粨鏋溿?br />
浠g爜濡備笅錛?br />
void聽_radix_sort(int*src,int*dst,int聽len,int聽offset);

int聽radix_sort(int*array,int聽begin,int聽end)
{
聽聽聽聽
if(array==NULL||begin>end)聽return0;

聽聽聽聽
int聽len聽=聽end-begin+1;
聽聽聽聽
int*tmp聽=聽malloc(sizeof(int)*len);

聽聽聽聽
int*src,*dst;

聽聽聽聽src聽
=聽array;
聽聽聽聽dst聽
=聽tmp;

聽聽聽聽
int聽i;
聽聽聽聽
for(i=0;i<32;i+=4){
聽聽聽聽聽聽聽聽_radix_sort(src,dst,len,i);
聽聽聽聽聽聽聽聽tmp聽
=聽src;
聽聽聽聽聽聽聽聽src聽
=聽dst;
聽聽聽聽聽聽聽聽dst聽
=聽tmp;
聽聽聽聽}

聽聽聽聽free(dst);

聽聽聽聽
return1;
}

void聽_radix_sort(int*src,int*dst,int聽len,int聽offset)
{
聽聽聽聽
int聽cnt[16];
聽聽聽聽memset(cnt,
0,sizeof(cnt));

聽聽聽聽
int聽mask聽=0xF<<offset;

聽聽聽聽
int聽i=0;
聽聽聽聽
for(i=0;i<len;++i){
聽聽聽聽聽聽聽聽cnt[聽(src[i]
&mask)>>offset聽]聽++;
聽聽聽聽}

聽聽聽聽
for(i=1;i<16;++i){
聽聽聽聽聽聽聽聽cnt[i]
+=cnt[i-1];
聽聽聽聽}

聽聽聽聽
for(i=len-1;i>=0;--i){
聽聽聽聽聽聽聽聽dst[
--cnt[(src[i]&mask)>>offset]]聽=聽src[i];聽
聽聽聽聽}
}





YZY 2009-07-17 19:49 鍙戣〃璇勮
]]>
[鍩虹綆楁硶澶嶄範]鍘熷湴緗崲鐨勯棿鎺ユ帓搴?/title><link>http://www.shnenglu.com/yuziyu/archive/2009/07/16/90212.html</link><dc:creator>YZY</dc:creator><author>YZY</author><pubDate>Thu, 16 Jul 2009 03:52:00 GMT</pubDate><guid>http://www.shnenglu.com/yuziyu/archive/2009/07/16/90212.html</guid><wfw:comment>http://www.shnenglu.com/yuziyu/comments/90212.html</wfw:comment><comments>http://www.shnenglu.com/yuziyu/archive/2009/07/16/90212.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/yuziyu/comments/commentRss/90212.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/yuziyu/services/trackbacks/90212.html</trackback:ping><description><![CDATA[瀵逛簬澶嶅埗浠d環寰堥珮鐨勫厓绱狅紝閫氳繃鏌愮鎺掑簭綆楁硶榪涜闂存帴鎺掑簭銆?br />鎺掑簭瀹屾垚鍚庯紝鍐嶄竴嬈″鍒跺洖鍘匯?br />榪欐牱闇瑕佷竴涓腑闂存暟緇勶紝榪涜2N嬈″鍒躲?br />閫氳繃鍘熷湴緗崲錛屾垜浠彲浠ュ彧浣跨敤涓涓腑闂村彉閲忥紝鏈澶氳繘琛?N/2嬈″鍒跺嵆鍙揪鍒扮洰鐨勩?br /><br />濡俰ndex[1]==3銆傞偅涔堬紝璇存槑array[1]榪欎釜浣嶇疆搴旇鏀劇殑鏄痑rray[3].鎴戜滑灝哸rray[1]淇濆瓨鍒皌mp涓?br />鐒跺悗array[1]=array[3].鐜板湪array[3]鏄彲浠ユ斁緗殑浜嗐傞偅涔堟垜浠湅array[3]搴旇鏀句粈涔堬紝濡傛灉index[3]==2,鍒氬ソ鎴戜滑鎶妕mp鏀懼洖鍘匯?br />涓嶇劧錛屾垜浠戶緇寜榪欎釜閾炬壘涓嬪幓銆?br />濡傛灉閾鵑暱涓簒.閭d箞鎴戜滑闇瑕亁+1嬈″鍒躲?br />閾鵑暱鏈灝忎負2.鎵浠ユ垜浠渶澶氬彧闇瑕?N/2嬈″鍒跺嵆鍙?br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽indirect_sort(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽len)聽{<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(array</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">NULL</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">len</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);">)聽</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 />聽聽聽聽<br />聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">绱㈠紩鏁扮粍</span><span style="color: rgb(0, 128, 0);"><br /></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);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">index聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽malloc(</span><span style="color: rgb(0, 0, 255);">sizeof</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);">)</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">(len));<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(index</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">NULL)聽</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 /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i,j,largest,tmp,tmp2;<br /><br />聽聽聽聽</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);">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);">len;</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">i){<br />聽聽聽聽聽聽聽聽index[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽i;<br />聽聽聽聽}<br /><br />聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鎻掑叆鎺掑簭</span><span style="color: rgb(0, 128, 0);"><br /></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);">len;</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">i){<br />聽聽聽聽聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽index[i];<br />聽聽聽聽聽聽聽聽</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);">i;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);">>=</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);">array[index[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);">]]</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">array[tmp];</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">j){<br />聽聽聽聽聽聽聽聽聽聽聽聽index[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽index[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);">];<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽index[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽}<br /><br />聽聽聽聽</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);">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);">len;</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">i){<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">濡傛灉index[i]==i錛岃鏄巃rray[i]宸茬粡鏀懼埌浜嗘渶緇堢殑鍦版柟銆?/span><span style="color: rgb(0, 128, 0);"><br /></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);">(聽index[i]聽</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">聽i)<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">continue</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);">{<br />聽聽聽聽聽聽聽聽聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[i];<br />聽聽聽聽聽聽聽聽聽聽聽聽j聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽i;<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(聽index[j]</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">i聽){<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">array[j]搴旇鏀劇殑鏄痑rray[index[j]]</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽array[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[index[j]];<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽tmp2聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽j;<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽j聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽index[j];<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍘熸潵鐨刟rray[j]宸茬粡鏀懼ソ浜?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽index[tmp2]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp2;<br />聽聽聽聽聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽聽聽聽聽array[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽聽聽聽聽聽聽聽聽index[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽j;<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽}<br /><br />聽聽聽聽</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);">1</span><span style="color: rgb(0, 0, 0);">;<br />}<br /><br /></span></div><br /><img src ="http://www.shnenglu.com/yuziyu/aggbug/90212.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/yuziyu/" target="_blank">YZY</a> 2009-07-16 11:52 <a href="http://www.shnenglu.com/yuziyu/archive/2009/07/16/90212.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[鍩虹綆楁硶澶嶄範]Shell鎺掑簭http://www.shnenglu.com/yuziyu/archive/2009/07/16/90201.htmlYZYYZYThu, 16 Jul 2009 01:33:00 GMThttp://www.shnenglu.com/yuziyu/archive/2009/07/16/90201.htmlhttp://www.shnenglu.com/yuziyu/comments/90201.htmlhttp://www.shnenglu.com/yuziyu/archive/2009/07/16/90201.html#Feedback0http://www.shnenglu.com/yuziyu/comments/commentRss/90201.htmlhttp://www.shnenglu.com/yuziyu/services/trackbacks/90201.htmlShell鎺掑簭浣跨敤涓涓掑搴忓垪h1,h2,h3...hk. h1==1銆?br />浠巋k寮濮嬶紝姣忔灝嗛棿闅攈x鐨勫簭鍒楁帓濂藉簭錛岀洿鍒癶1銆傞棿闅攈x鐨勫簭鍒楁帓濂藉簭鐨勬暟緇勫彲浠ョО涔嬩負hx鏈夊簭銆?br />Shell鎺掑簭鏈変竴涓噸瑕佺殑鎬ц川鏄竴涓猦x鏈夊簭鏁扮粍錛屽繀鐒舵槸涓涓猦x+1鏈夊簭鏁扮粍銆?br />姣忎竴閬嶆帓搴忚繃紼嬪彲浠ヤ嬌鐢ㄦ彃鍏ユ帓搴忋?br />
Shell鎺掑簭鐨勬ц兘鍙栧喅浜庨掑搴忓垪鐨勯夋嫨銆備笅闈唬鐮佺殑閫掑搴忓垪鏄痩en/2,len/4...,1.

int聽shell_sort(int*array,int聽begin,int聽end)
{
聽聽聽聽
if(array==NULL||begin>end)聽return0;

聽聽聽聽
int聽len聽=聽end-begin+1;

聽聽聽聽
int聽i,j,gap,tmp;
聽聽聽聽
for(gap=len/2;gap>=1;gap/=2){
聽聽聽聽聽聽聽
for(i=begin+gap;i<=end;++i){
聽聽聽聽聽聽聽聽聽聽聽j聽
=聽i;
聽聽聽聽聽聽聽聽聽聽聽tmp聽
=聽array[j];
聽聽聽聽聽聽聽聽聽聽聽
while(聽j-gap>=begin&&array[j-gap]>tmp聽){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽array[j]聽
=聽array[j-gap];
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽j
-=gap;
聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽聽聽聽array[j]聽
=聽tmp;
聽聽聽聽聽聽聽}
聽聽聽聽}

聽聽聽聽
return1;
}




YZY 2009-07-16 09:33 鍙戣〃璇勮
]]>
[鍩虹綆楁硶澶嶄範]鍐掓場鎺掑簭鍜岄夋嫨鎺掑簭http://www.shnenglu.com/yuziyu/archive/2009/07/15/90126.htmlYZYYZYWed, 15 Jul 2009 03:59:00 GMThttp://www.shnenglu.com/yuziyu/archive/2009/07/15/90126.htmlhttp://www.shnenglu.com/yuziyu/comments/90126.htmlhttp://www.shnenglu.com/yuziyu/archive/2009/07/15/90126.html#Feedback0http://www.shnenglu.com/yuziyu/comments/commentRss/90126.htmlhttp://www.shnenglu.com/yuziyu/services/trackbacks/90126.html
鍐掓場鎺掑簭錛?br />
int聽bubble_sort(int*array,int聽begin,int聽end)
{
聽聽聽聽
if(array==NULL||begin>end)聽return0;

聽聽聽聽
int聽i,j;

聽聽聽聽
for(i=end;i>begin;--i){
聽聽聽聽聽聽聽聽
for(j=begin;j<i;++j){
聽聽聽聽聽聽聽聽聽聽聽聽
if(聽array[j]>array[j+1]聽){
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
int聽tmp聽=聽array[j];
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽array[j]聽
=聽array[j+1];
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽array[j
+1]聽=聽tmp;
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽}
聽聽聽聽}

聽聽聽聽
return1;
}

閫夋嫨鎺掑簭錛?br />
int聽select_sort(int*array,int聽begin,int聽end)聽{

聽聽聽聽
if(array==NULL||begin>end)聽return0;

聽聽聽聽
int聽i,j,largest,tmp;

聽聽聽聽
for(i=end;i>begin;--i){

聽聽聽聽聽聽聽聽largest聽
=聽i;
聽聽聽聽聽聽聽聽
for(j=begin;j<=i;++j){
聽聽聽聽聽聽聽聽聽聽聽聽
if(聽array[largest]<array[j]聽)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽largest聽
=聽j;
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽tmp聽
=聽array[i];
聽聽聽聽聽聽聽聽array[i]聽
=聽array[largest];
聽聽聽聽聽聽聽聽array[largest]聽
=聽tmp;
聽聽聽聽}

聽聽聽聽
return1;
}




YZY 2009-07-15 11:59 鍙戣〃璇勮
]]>
[鍩虹綆楁硶澶嶄範]褰掑茍鎺掑簭http://www.shnenglu.com/yuziyu/archive/2009/07/15/90122.htmlYZYYZYWed, 15 Jul 2009 03:46:00 GMThttp://www.shnenglu.com/yuziyu/archive/2009/07/15/90122.htmlhttp://www.shnenglu.com/yuziyu/comments/90122.htmlhttp://www.shnenglu.com/yuziyu/archive/2009/07/15/90122.html#Feedback0http://www.shnenglu.com/yuziyu/comments/commentRss/90122.htmlhttp://www.shnenglu.com/yuziyu/services/trackbacks/90122.html
static void 聽_merge( int * src, int 聽begin, int 聽end);

int 聽merge_sort( int * array, int 聽begin, int 聽end)
{
聽聽聽聽
if (array == NULL || begin > end)聽 return 0 ;

聽聽聽
int 聽mid聽 = 聽begin + (end - begin) / 2 ;
聽聽 merge_sort(src,begin,mid);
聽聽 merge_sort(src,mid
+ 1 ,end);
聽聽聽_merge(src,begin,end);

聽聽聽 return 1;
}

static void 聽_merge( int * src, int 聽begin, int 聽end)
{
聽聽聽聽
int 聽mid聽 = 聽begin + (end - begin) / 2 ;

聽聽聽聽
int 聽b1聽 = 聽begin;
聽聽聽聽
int 聽e1聽 = 聽mid;
聽聽聽聽
int 聽b2聽 = 聽mid + 1 ;
聽聽聽聽
int 聽e2聽 = 聽end;

聽聽聽聽
int * dest聽 = 聽malloc( sizeof ( int ) * (end - begin + 1 ));
聽聽聽聽
if (dest == NULL)聽 return ;

聽聽聽聽
int 聽i1;
聽聽聽聽
int 聽i2;
聽聽聽聽
int 聽i;
聽聽聽聽
for (i1 = b1,i2 = b2,i = begin;i1 <= e1 && i2 <= e2 && i <= end; ++ i){
聽聽聽聽聽聽聽聽
if (src[i1] < src[i2]){
聽聽聽聽聽聽聽聽聽聽聽聽dest[i
- begin]聽 = 聽src[i1];
聽聽聽聽聽聽聽聽聽聽聽聽i1
++ ;
聽聽聽聽聽聽聽聽}
else {
聽聽聽聽聽聽聽聽聽聽聽聽dest[i
- begin]聽 = 聽src[i2];
聽聽聽聽聽聽聽聽聽聽聽聽i2
++ ;
聽聽聽聽聽聽聽聽}
聽聽聽聽}

聽聽聽聽
for (;i <= end && i1 <= e1; ++ i, ++ i1)
聽聽聽聽聽聽聽dest[i
- begin]聽 = 聽src[i1];
聽聽聽聽
for (;i <= end && i2 <= e2; ++ i, ++ i2)
聽聽聽聽聽聽聽dest[i
- begin]聽 = 聽src[i2];

聽聽聽聽
for (i = begin;i <= end; ++ i)
聽聽聽聽聽聽聽聽src[i]聽
= 聽dest[i - begin];

聽聽聽聽free(dest);
}


鍋氫竴浜涘皬浼樺寲錛屽彧鍒涘緩涓嬈′復鏃舵暟緇勩?br />
void聽_mergesort(int*array,int*tmp,int聽start,int聽end);

void聽mergesort(int*array,int聽len)
{
聽聽聽聽
int聽i,*tmp;

聽聽聽聽
if(array==NULL||len==0)
聽聽聽聽聽聽聽聽
return;

聽聽聽聽tmp聽
=聽(int*)malloc(sizeof(int)*len);

聽聽聽聽_mergesort(array,tmp,
0,len-1);

聽聽聽 free(tmp);
}

void聽_mergesort(int*array,int*tmp,int聽start,int聽end)
{
聽聽聽聽
int聽mid聽=聽(start+end)/2;
聽聽聽聽
int聽i,j,k;

聽聽聽聽
if(start>=end)
聽聽聽聽聽聽聽聽
return;
聽聽聽聽
聽聽聽聽_mergesort(array,tmp,start,mid);
聽聽聽聽_mergesort(array,tmp,mid
+1,end);

聽聽聽i聽
=聽start;
聽聽聽j聽
=聽mid+1;

聽聽聽
for(k=start;k<=end&&i<=mid&&j<=end;++k){
聽聽聽聽聽聽聽
if(array[i]<array[j]){
聽聽聽聽聽聽聽聽聽聽聽tmp[k]聽
=聽array[i];
聽聽聽聽聽聽聽聽聽聽聽i
++;
聽聽聽聽聽聽聽}
else{
聽聽聽聽聽聽聽聽聽聽聽tmp[k]
=聽array[j];
聽聽聽聽聽聽聽聽聽聽聽j
++;
聽聽聽聽聽聽聽}
聽聽聽}

聽聽聽
for(;i<=mid;++i)
聽聽聽聽聽聽聽tmp[k
++]=array[i];

聽聽聽
for(;j<=end;++j)
聽聽聽聽聽聽聽tmp[k
++]=array[j];
聽聽聽聽聽聽
聽聽memcpy(
&array[start],&tmp[start],sizeof(int)*(end-start+1));聽
}
聽聽聽



YZY 2009-07-15 11:46 鍙戣〃璇勮
]]>
[鍩虹綆楁硶澶嶄範]鍫嗘帓搴?/title><link>http://www.shnenglu.com/yuziyu/archive/2009/07/15/90109.html</link><dc:creator>YZY</dc:creator><author>YZY</author><pubDate>Wed, 15 Jul 2009 01:50:00 GMT</pubDate><guid>http://www.shnenglu.com/yuziyu/archive/2009/07/15/90109.html</guid><wfw:comment>http://www.shnenglu.com/yuziyu/comments/90109.html</wfw:comment><comments>http://www.shnenglu.com/yuziyu/archive/2009/07/15/90109.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/yuziyu/comments/commentRss/90109.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/yuziyu/services/trackbacks/90109.html</trackback:ping><description><![CDATA[ <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 0, 255);">static</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);">聽_build_heap(</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">*</span> <span style="color: rgb(0, 0, 0);">array,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽len);<br /></span> <span style="color: rgb(0, 0, 255);">static</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);">聽_adjust_heap(</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">*</span> <span style="color: rgb(0, 0, 0);">array,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽idx,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽len);<br /><br /></span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽heap_sort(</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">*</span> <span style="color: rgb(0, 0, 0);">array,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽begin,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽end)<br />{<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">if</span> <span style="color: rgb(0, 0, 0);">(array</span> <span style="color: rgb(0, 0, 0);">==</span> <span style="color: rgb(0, 0, 0);">NULL</span> <span style="color: rgb(0, 0, 0);">||</span> <span style="color: rgb(0, 0, 0);">begin</span> <span style="color: rgb(0, 0, 0);">></span> <span style="color: rgb(0, 0, 0);">end)聽</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 /><br />聽聽聽聽</span> <span style="color: rgb(0, 128, 0);">//</span> <span style="color: rgb(0, 128, 0);">鑷浠ュ悗錛宨ndex浠?寮濮嬨?/span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 0);">聽聽聽聽array</span> <span style="color: rgb(0, 0, 0);">--</span> <span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽len聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽end</span> <span style="color: rgb(0, 0, 0);">-</span> <span style="color: rgb(0, 0, 0);">begin</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 />聽聽聽聽_build_heap(array,len);<br /><br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽i;<br /><br />聽聽聽聽</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);">len;</span> <span style="color: rgb(0, 0, 0);">++</span> <span style="color: rgb(0, 0, 0);">i){<br />聽聽聽聽聽聽聽聽tmp聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽array[len</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);">1</span> <span style="color: rgb(0, 0, 0);">];<br />聽聽聽聽聽聽聽聽array[len</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);">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);">聽array[</span> <span style="color: rgb(0, 0, 0);">1</span> <span style="color: rgb(0, 0, 0);">];<br />聽聽聽聽聽聽聽聽array[</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);">聽tmp;<br />聽聽聽聽聽聽聽聽_adjust_heap(array,</span> <span style="color: rgb(0, 0, 0);">1</span> <span style="color: rgb(0, 0, 0);">,len</span> <span style="color: rgb(0, 0, 0);">-</span> <span style="color: rgb(0, 0, 0);">i);<br />聽聽聽聽}<br />}<br /><br /></span> <span style="color: rgb(0, 128, 0);">//</span> <span style="color: rgb(0, 128, 0);">input:聽浠繪剰鏁扮粍聽output:澶ч《鍫?/span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 255);">static</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);">聽_build_heap(</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">*</span> <span style="color: rgb(0, 0, 0);">array,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽len)<br />{<br />聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽i;<br />聽聽聽</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);">len</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);">;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);">;</span> <span style="color: rgb(0, 0, 0);">--</span> <span style="color: rgb(0, 0, 0);">i){<br />聽聽聽聽聽聽聽聽_adjust_heap(array,i,len);<br />聽聽聽}<br />}<br /><br /></span> <span style="color: rgb(0, 128, 0);">//</span> <span style="color: rgb(0, 128, 0);">浣塊噸鏂頒嬌array婊¤凍鍫嗙壒鎬?/span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 255);">static</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);">聽_adjust_heap(</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">*</span> <span style="color: rgb(0, 0, 0);">array,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽idx,</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽len)<br />{<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽left;<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽right;<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽larger聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽idx;<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">int</span> <span style="color: rgb(0, 0, 0);">聽tmp聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽array[idx];<br /><br />聽聽聽聽left聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽(idx</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 />聽聽聽聽right聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽left</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 /><br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">while</span> <span style="color: rgb(0, 0, 0);">(聽left</span> <span style="color: rgb(0, 0, 0);"><=</span> <span style="color: rgb(0, 0, 0);">聽len){<br />聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">if</span> <span style="color: rgb(0, 0, 0);">(right</span> <span style="color: rgb(0, 0, 0);"><=</span> <span style="color: rgb(0, 0, 0);">len</span> <span style="color: rgb(0, 0, 0);">&&</span> <span style="color: rgb(0, 0, 0);">array[right]</span> <span style="color: rgb(0, 0, 0);">></span> <span style="color: rgb(0, 0, 0);">array[left]){<br />聽聽聽聽聽聽聽聽聽聽聽聽larger聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽right;聽<br />聽聽聽聽聽聽聽聽}</span> <span style="color: rgb(0, 0, 255);">else</span> <span style="color: rgb(0, 0, 0);">{<br />聽聽聽聽聽聽聽聽聽聽聽聽larger聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽left;<br />聽聽聽聽聽聽聽聽}<br /><br />聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">if</span> <span style="color: rgb(0, 0, 0);">(聽array[larger]</span> <span style="color: rgb(0, 0, 0);">></span> <span style="color: rgb(0, 0, 0);">tmp聽){<br />聽聽聽聽聽聽聽聽聽聽聽聽array[idx]聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽array[larger];<br />聽聽聽聽聽聽聽聽聽聽聽聽idx聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽larger;<br />聽聽聽聽聽聽聽聽聽聽聽聽left聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽(idx</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 />聽聽聽聽聽聽聽聽聽聽聽聽right聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽left</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, 0, 255);">else</span> <span style="color: rgb(0, 0, 0);">{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">break</span> <span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽}<br /><br />聽聽聽聽array[idx]聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽tmp;<br />}<br /><br /></span> </div> <br /> <img src ="http://www.shnenglu.com/yuziyu/aggbug/90109.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/yuziyu/" target="_blank">YZY</a> 2009-07-15 09:50 <a href="http://www.shnenglu.com/yuziyu/archive/2009/07/15/90109.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[鍩虹綆楁硶澶嶄範]蹇熸帓搴?/title><link>http://www.shnenglu.com/yuziyu/archive/2009/07/14/90079.html</link><dc:creator>YZY</dc:creator><author>YZY</author><pubDate>Tue, 14 Jul 2009 13:58:00 GMT</pubDate><guid>http://www.shnenglu.com/yuziyu/archive/2009/07/14/90079.html</guid><wfw:comment>http://www.shnenglu.com/yuziyu/comments/90079.html</wfw:comment><comments>http://www.shnenglu.com/yuziyu/archive/2009/07/14/90079.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/yuziyu/comments/commentRss/90079.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/yuziyu/services/trackbacks/90079.html</trackback:ping><description><![CDATA[鏈鍩虹鐨勫揩閫熸帓搴?br />浼樼偣錛氱紪鐮佺畝鍗曪紝娓呮櫚<br />緙虹偣錛氬浜庢帓濂藉簭鐨勮緭鍏ワ紝鏃墮棿澶嶆潅搴︿負O(n^2)<br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">static</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);">聽partition(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽start,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end);<br /><br /></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽quicksort(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽start,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(array</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">NULL</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">start</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">end)聽</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 /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽t聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽partition(array,start,end);<br /><br />聽聽聽聽quicksort(array,start,t</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 />聽聽聽聽quicksort(array,t</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);">,end);<br /><br />聽聽聽聽</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);">1</span><span style="color: rgb(0, 0, 0);">;<br />}<br /><br /></span><span style="color: rgb(0, 0, 255);">static</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);">聽partition(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽start,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽pivot聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[start];聽聽聽聽<br /><br />聽聽聽聽</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, 0);">=</span><span style="color: rgb(0, 0, 0);">聽start;<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</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);">聽end;<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">while</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聽){<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(</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);">i</span><span style="color: rgb(0, 0, 0);">&& array[j]</span><span style="color: rgb(0, 0, 0);">>=</span><span style="color: rgb(0, 0, 0);">pivot</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);">;<br />聽聽聽聽聽聽聽聽array[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[j];<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">( j>i&& array[i]</span><span style="color: rgb(0, 0, 0);"><=</span><span style="color: rgb(0, 0, 0);">pivot</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);"> )聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽array[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[i];<br />聽聽聽聽}<br /><br />聽聽聽聽array[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽pivot;<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽i;<br />}<br /><br /></span></div><br />鏀硅繘錛氬皬鏁扮粍鐩存帴鐢ㄦ彃鍏ユ帓搴忓疄鐜幫紝涓灑鍊煎彇(begin,mid,end)涓夎呯殑涓棿鍊鹼紝瀵規湁搴忔暟緇勬帓搴忎粛涓篛(nlogn)銆傚噺灝戜簡杈圭晫鏉′歡媯鏌?br />緙虹偣錛氱紪鐮佸鏉傘?br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">#include聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">stdio.h</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"><br />#include聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">stdlib.h</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"><br />#include聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">memory.h</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"><br /><br /></span><span style="color: rgb(0, 0, 255);">#define</span><span style="color: rgb(0, 0, 0);">聽SMALL_N聽10</span><span style="color: rgb(0, 0, 0);"><br /><br /></span><span style="color: rgb(0, 0, 255);">static</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);">聽partition(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽begin,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end);<br /><br /></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽_quicksort(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽begin,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end);<br /><br /></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽insertsort(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽len)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i;<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(array</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">NULL</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">len</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, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">;<br /><br />聽聽聽聽</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);">len;</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">i){<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽temp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[i];<br />聽聽聽聽聽聽聽聽</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, 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);">i;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);">&&</span><span style="color: rgb(0, 0, 0);">temp</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">array[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);">];</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">j){<br />聽聽聽聽聽聽聽聽聽聽聽聽array[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[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);">];<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽array[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽temp;<br />聽聽聽聽}<br /><br />}<br /><br /></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽quicksort(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽len)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(array</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">NULL</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">len</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, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">;<br /><br />聽聽聽聽_quicksort(array,</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">,len</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 />}<br /><br /><br /></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽_quicksort(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽begin,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽pivot;<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽pivot_pos;<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(end</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">begin</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);">SMALL_N){<br />聽聽聽聽聽聽聽聽insertsort(</span><span style="color: rgb(0, 0, 0);">&</span><span style="color: rgb(0, 0, 0);">array[begin],end</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">begin</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, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽}<br /><br />聽聽聽聽pivot_pos聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽partition(array,begin,end);<br />聽聽聽聽_quicksort(array,begin,pivot_pos</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 />聽聽聽聽_quicksort(array,pivot_pos</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);">,end);<br />}<br /><br /></span><span style="color: rgb(0, 0, 255);">static</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);">聽聽mid3(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽begin,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽mid聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽(end</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">begin)</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);">begin;<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽tmp;<br /><br />聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[mid];<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(tmp</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">array[begin]){<br />聽聽聽聽聽聽聽聽array[mid]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[begin];<br />聽聽聽聽聽聽聽聽array[begin]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽}<br /><br />聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[end];<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(tmp</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">array[mid]){<br />聽聽聽聽聽聽聽聽array[end]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[mid];<br /><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(tmp</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">array[begin]){<br />聽聽聽聽聽聽聽聽聽聽聽array[mid]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[begin];<br />聽聽聽聽聽聽聽聽聽聽聽array[begin]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);">{<br />聽聽聽聽聽聽聽聽聽聽聽聽array[mid]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽}<br /><br />聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[end</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 />聽聽聽聽array[end</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);">聽array[mid];<br />聽聽聽聽array[mid]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽array[end</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 />}<br /><br /><br /></span><span style="color: rgb(0, 0, 255);">static</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);">聽partition(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">array,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽begin,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽end)<br />{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽pivot聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽mid3(array,begin,end);<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i,聽j;<br /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽tmp;<br /><br />聽聽聽聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽begin;<br />聽聽聽聽j聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽end</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 /><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">while</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, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(array[</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);">pivot)聽;<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(array[</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);">pivot)聽;<br />聽聽聽聽聽聽聽<br />聽聽聽聽聽聽聽</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)<br />聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">break</span><span style="color: rgb(0, 0, 0);">;<br /><br />聽聽聽聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[j];<br />聽聽聽聽聽聽聽array[j]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[i];<br />聽聽聽聽聽聽聽array[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽tmp;<br />聽聽聽聽}<br /><br />聽聽聽聽tmp聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[i];<br />聽聽聽聽array[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽array[end</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 />聽聽聽聽array[end</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);">聽tmp;<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽i;<br />}<br /><br /></span></div><br /><br /><br /><br /><br /><img src ="http://www.shnenglu.com/yuziyu/aggbug/90079.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/yuziyu/" target="_blank">YZY</a> 2009-07-14 21:58 <a href="http://www.shnenglu.com/yuziyu/archive/2009/07/14/90079.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.020rj.cn" target="_blank">亚洲欧美国产日韩综合久久</a>| <a href="http://www.jhitezpt.cn" target="_blank">久久―日本道色综合久久</a>| <a href="http://www.91pang.cn" target="_blank">欧美日韩成人精品久久久免费看 </a>| <a href="http://www.stargaze3s.cn" target="_blank">色综合久久夜色精品国产</a>| <a href="http://www.3q168.net.cn" target="_blank">色狠狠久久综合网</a>| <a href="http://www.thankers.com.cn" target="_blank">国内精品伊人久久久久</a>| <a href="http://www.handyx.cn" target="_blank">伊人久久大香线蕉AV一区二区 </a>| <a href="http://www.www9785.cn" target="_blank">蜜臀av性久久久久蜜臀aⅴ </a>| <a href="http://www.63552277.cn" target="_blank">久久伊人影视</a>| <a href="http://www.99341.cn" target="_blank">99久久无码一区人妻a黑</a>| <a href="http://www.dabage.cn" target="_blank">欧美成a人片免费看久久</a>| <a href="http://www.kangaiw.cn" target="_blank">久久天天躁狠狠躁夜夜96流白浆</a>| <a href="http://www.bestfanyi.cn" target="_blank">欧美伊香蕉久久综合类网站</a>| <a href="http://www.yaojiji.cn" target="_blank">久久国产劲爆AV内射—百度</a>| <a href="http://www.99yingyuan.cn" target="_blank">精品久久久久久99人妻</a>| <a href="http://www.fouming.cn" target="_blank">男女久久久国产一区二区三区</a>| <a href="http://www.hwumbrella.cn" target="_blank">久久精品国产99国产精品</a>| <a href="http://www.pz897.cn" target="_blank">国产亚洲精品美女久久久</a>| <a href="http://www.8hi6.cn" target="_blank">思思久久精品在热线热</a>| <a href="http://www.qunfazongzhan.cn" target="_blank">久久本道久久综合伊人</a>| <a href="http://www.px2s.cn" target="_blank">欧美久久综合性欧美</a>| <a href="http://www.ozxt.cn" target="_blank">久久久久久久亚洲Av无码</a>| <a href="http://www.9978217.cn" target="_blank">久久青青草视频</a>| <a href="http://www.nuopie.cn" target="_blank">伊人久久大香线蕉精品不卡</a>| <a href="http://www.sansiwu.cn" target="_blank">精品久久久无码中文字幕</a>| <a href="http://www.9746.com.cn" target="_blank">99久久精品国产麻豆</a>| <a href="http://www.1rizu.cn" target="_blank">久久久国产精品亚洲一区</a>| <a href="http://www.yndi.com.cn" target="_blank">精品久久久久久国产</a>| <a href="http://www.syggzy.org.cn" target="_blank">亚洲人成无码www久久久</a>| <a href="http://www.bjnyjdxcj.cn" target="_blank">久久久久国产一级毛片高清板</a>| <a href="http://www.zhangmengm.cn" target="_blank">欧美一区二区精品久久</a>| <a href="http://www.a88wx.cn" target="_blank">色噜噜狠狠先锋影音久久</a>| <a href="http://www.gzsaikou.cn" target="_blank">精品一区二区久久</a>| <a href="http://www.hskx.org.cn" target="_blank">青青青青久久精品国产h</a>| <a href="http://www.niena.cn" target="_blank">国产欧美久久久精品</a>| <a href="http://www.qdog.com.cn" target="_blank">久久精品国内一区二区三区</a>| <a href="http://www.haotese.cn" target="_blank">国产精品久久久久久久久</a>| <a href="http://www.sc-cits.com.cn" target="_blank">狠狠色丁香婷综合久久</a>| <a href="http://www.smmz.com.cn" target="_blank">国产精品xxxx国产喷水亚洲国产精品无码久久一区 </a>| <a href="http://www.popotang.cn" target="_blank">国产精品免费久久</a>| <a href="http://www.shanzhaiji.com.cn" target="_blank">国产无套内射久久久国产</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>