锘??xml version="1.0" encoding="utf-8" standalone="yes"?>伊人久久五月丁香综合中文亚洲,亚洲免费在线观看视频,中文字幕亚洲激情http://m.tkk7.com/fullfocus/category/30492.htmlzh-cnTue, 22 Apr 2008 20:50:14 GMTTue, 22 Apr 2008 20:50:14 GMT60(杞?鍒ゆ柇鏁扮粍涓厓绱犳槸鍚﹂噸澶?/title><link>http://m.tkk7.com/fullfocus/archive/2008/04/22/194901.html</link><dc:creator>fullfocus</dc:creator><author>fullfocus</author><pubDate>Tue, 22 Apr 2008 14:47:00 GMT</pubDate><guid>http://m.tkk7.com/fullfocus/archive/2008/04/22/194901.html</guid><wfw:comment>http://m.tkk7.com/fullfocus/comments/194901.html</wfw:comment><comments>http://m.tkk7.com/fullfocus/archive/2008/04/22/194901.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/fullfocus/comments/commentRss/194901.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/fullfocus/services/trackbacks/194901.html</trackback:ping><description><![CDATA[<br /> 闈㈣瘯鐨勫父鑰冮錛屽叧娉ㄧ畻娉曞鏉傚害鍜岀┖闂達紝 <br /> <br /> 鍋囧鏄笅闈㈢殑鏂規硶鍒ゆ柇鏄惁鏈夐噸澶?<br /> int a[MAX] = {0}; <br /> unsigned int x; <br /> for(int i=0;i <n;i++) <br /> { <br />    //璇誨叆x <br />    if(a[x]==1) <br />    { <br />        //x閲嶅鍑虹幇浜?<br />    } <br />    else <br />    { <br />        a[x]=1; <br />    } <br /> } <br /> <br /> 閭d箞錛孧AX姣旇緝澶ф椂灝變笉鍚堥備簡 <br /> 浣嗘槸鍙互鎶?#8220;鐢╥nt鏁扮粍璁板綍鏄惁閲嶅”鏀逛負“鐢ㄦ瘡涓涓猙it璁板綍鏄惁閲嶅”錛屼簬鏄彉鎴愶細 <br /> int a[MAX] = {0}; <br /> unsigned int x; <br /> const int iBitCount = 32; <br /> for(int i=0;i <n;i++) <br /> { <br />    //璇誨叆x <br />    if(a[x/iBitCount]& (1 < <(x%iBitCount))!=0) <br />    { <br />        //x閲嶅鍑虹幇浜?<br />    } <br />    else <br />    { <br />        a[x/iBitCount] ¦= (1 < <(x%iBitCount)); <br />    } <br /> } <br /> <br /> 鍙︽湁錛屽師鍦版帓搴忕瓑O(1)錛屾帓搴忓悗闄ら噸絳?br /> <br /> <br /> <img src ="http://m.tkk7.com/fullfocus/aggbug/194901.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/fullfocus/" target="_blank">fullfocus</a> 2008-04-22 22:47 <a href="http://m.tkk7.com/fullfocus/archive/2008/04/22/194901.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>8鐨囧悗闂錛嶅洖婧?/title><link>http://m.tkk7.com/fullfocus/archive/2008/04/12/192484.html</link><dc:creator>fullfocus</dc:creator><author>fullfocus</author><pubDate>Sat, 12 Apr 2008 15:39:00 GMT</pubDate><guid>http://m.tkk7.com/fullfocus/archive/2008/04/12/192484.html</guid><wfw:comment>http://m.tkk7.com/fullfocus/comments/192484.html</wfw:comment><comments>http://m.tkk7.com/fullfocus/archive/2008/04/12/192484.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/fullfocus/comments/commentRss/192484.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/fullfocus/services/trackbacks/192484.html</trackback:ping><description><![CDATA[<br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><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 /> #include </span><span style="color: #000000;"><</span><span style="color: #000000;">stdlib.h</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;">void</span><span style="color: #000000;">  eightQueen(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">**</span><span style="color: #000000;"> board, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> n, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> m);<br /> </span><span style="color: #008000;">/*</span><span style="color: #008000;">if valid, return 1</span><span style="color: #008000;">*/</span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> isValid(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">**</span><span style="color: #000000;">  board,</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> n, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> m, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> j);<br /> <br /> </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> main()<br /> {<br />     </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">**</span><span style="color: #000000;">board </span><span style="color: #000000;">=</span><span style="color: #000000;"> (</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">**</span><span style="color: #000000;">)malloc(sizeof(</span><span style="color: #0000ff;">int</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;">4</span><span style="color: #000000;">);<br />     </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</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;">0</span><span style="color: #000000;">;<br />     </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(;i</span><span style="color: #000000;"><</span><span style="color: #000000;">4</span><span style="color: #000000;">; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />     {<br />         board[i] </span><span style="color: #000000;">=</span><span style="color: #000000;"> (</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">) malloc(sizeof(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">) </span><span style="color: #000000;">*</span><span style="color: #000000;"> </span><span style="color: #000000;">4</span><span style="color: #000000;">);<br />     }<br />      i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />      j </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(;i</span><span style="color: #000000;"><</span><span style="color: #000000;">4</span><span style="color: #000000;">; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />         </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(; j </span><span style="color: #000000;"><</span><span style="color: #000000;"> </span><span style="color: #000000;">4</span><span style="color: #000000;">; j</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />         {<br />             board[i][j] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />         }    <br />     eightQueen(board, </span><span style="color: #000000;">4</span><span style="color: #000000;">,</span><span style="color: #000000;">4</span><span style="color: #000000;">);<br />     <br />      i </span><span style="color: #000000;">=</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;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />      </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(; i</span><span style="color: #000000;"><</span><span style="color: #000000;">4</span><span style="color: #000000;">; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />      {<br />         </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(; j </span><span style="color: #000000;"><</span><span style="color: #000000;"> </span><span style="color: #000000;">4</span><span style="color: #000000;">; j</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />         {<br />             printf(</span><span style="color: #000000;">"</span><span style="color: #000000;">%d(%d) </span><span style="color: #000000;">"</span><span style="color: #000000;">,board[i][j], i);<br />             <br />         }    <br />     }<br />         <br />     </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br /> }<br /> <br /> <br /> </span><span style="color: #0000ff;">void</span><span style="color: #000000;">  eightQueen(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">**</span><span style="color: #000000;"> board, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> n, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> m)<br /> {    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> ii </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> jj </span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> k </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     </span><span style="color: #0000ff;">while</span><span style="color: #000000;">(ii </span><span style="color: #000000;"><</span><span style="color: #000000;"> n </span><span style="color: #000000;">&&</span><span style="color: #000000;"> ii </span><span style="color: #000000;">>=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br />     {<br />     <br />         <br />         jj </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />         </span><span style="color: #0000ff;">while</span><span style="color: #000000;">( jj</span><span style="color: #000000;"><</span><span style="color: #000000;">m)<br />         {<br />             </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(board[ii][jj] </span><span style="color: #000000;">==</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;"> jj</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;"> m)<br />             {<br />                 board[ii][jj] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />                 board[ii][</span><span style="color: #000000;">++</span><span style="color: #000000;">jj] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">;<br />             }<br />             </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br />                 board[ii][jj] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">;<br />             <br />             </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(isValid(board, n,m,ii,jj))<br />             {<br />                 </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(ii </span><span style="color: #000000;">==</span><span style="color: #000000;"> n</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">) </span><span style="color: #0000ff;">return</span><span style="color: #000000;">;<br />             }<br />              </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br />              {<br />                  ii</span><span style="color: #000000;">++</span><span style="color: #000000;">;<br />                    </span><span style="color: #0000ff;">break</span><span style="color: #000000;">;<br />               }    <br />               jj</span><span style="color: #000000;">++</span><span style="color: #000000;">;<br />         }<br />         </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(jj</span><span style="color: #000000;">>=</span><span style="color: #000000;">m)<br />         {<br />             board[ii][jj</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;">0</span><span style="color: #000000;">;<br />             ii</span><span style="color: #000000;">--</span><span style="color: #000000;">;<br />         }<br />         <br />     }<br />     <br /> }<br /> </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> isValid(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">**</span><span style="color: #000000;"> board,</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> n, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> m, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> j)<br /> {<br />     </span><span style="color: #008000;">//</span><span style="color: #008000;">鍒ゆ柇鏄惁鍚屽垪</span><span style="color: #008000;"><br /> </span><span style="color: #000000;">    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> temp </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(; temp </span><span style="color: #000000;"><</span><span style="color: #000000;"> n; temp</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />     {<br />         </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(temp </span><span style="color: #000000;">!=</span><span style="color: #000000;"> i)<br />         {<br />         </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(board[temp][j] </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br />             </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />         }<br />             <br />     }<br />     </span><span style="color: #008000;">//</span><span style="color: #008000;">鍒ゆ柇鏄惁鍙充笂瑙?/span><span style="color: #008000;"><br /> </span><span style="color: #000000;">    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> ii, jj;<br />     </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(ii </span><span style="color: #000000;">=</span><span style="color: #000000;">i</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">, jj</span><span style="color: #000000;">=</span><span style="color: #000000;">j</span><span style="color: #000000;">+</span><span style="color: #000000;">1</span><span style="color: #000000;">; ii </span><span style="color: #000000;">>=</span><span style="color: #000000;">0</span><span style="color: #000000;">&&</span><span style="color: #000000;">jj </span><span style="color: #000000;"><=</span><span style="color: #000000;"> m; ii</span><span style="color: #000000;">--</span><span style="color: #000000;">,jj</span><span style="color: #000000;">++</span><span style="color: #000000;">)</span><span style="color: #008000;">//</span><span style="color: #008000;">娉ㄦ剰涓棿鍒ゆ柇鏉′歡鐨?amp;&</span><span style="color: #008000;"><br /> </span><span style="color: #000000;">    {<br />         </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(board[ii][jj] </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br />             </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     }<br />     </span><span style="color: #008000;">//</span><span style="color: #008000;">鍒ゆ柇鏄惁宸︿笂瑙?/span><span style="color: #008000;"><br /> </span><span style="color: #000000;">    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(ii </span><span style="color: #000000;">=</span><span style="color: #000000;">i</span><span style="color: #000000;">-</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">,jj</span><span style="color: #000000;">=</span><span style="color: #000000;">j</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">; ii </span><span style="color: #000000;">>=</span><span style="color: #000000;">0</span><span style="color: #000000;">&&</span><span style="color: #000000;">jj </span><span style="color: #000000;">>=</span><span style="color: #000000;">0</span><span style="color: #000000;">;ii</span><span style="color: #000000;">--</span><span style="color: #000000;">,jj</span><span style="color: #000000;">--</span><span style="color: #000000;">)<br />     {<br />         </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(board[ii][jj] </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br />             </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br />     }<br />     </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">;<br /> <br />     <br /> }<br /> </span></div> <br /> <br /> <br /> <br /> <img src ="http://m.tkk7.com/fullfocus/aggbug/192484.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/fullfocus/" target="_blank">fullfocus</a> 2008-04-12 23:39 <a href="http://m.tkk7.com/fullfocus/archive/2008/04/12/192484.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏈闀垮叕鍏卞瓙搴忓垪闂錛峜瀹炵幇http://m.tkk7.com/fullfocus/archive/2008/04/06/191124.htmlfullfocusfullfocusSun, 06 Apr 2008 14:51:00 GMThttp://m.tkk7.com/fullfocus/archive/2008/04/06/191124.htmlhttp://m.tkk7.com/fullfocus/comments/191124.htmlhttp://m.tkk7.com/fullfocus/archive/2008/04/06/191124.html#Feedback0http://m.tkk7.com/fullfocus/comments/commentRss/191124.htmlhttp://m.tkk7.com/fullfocus/services/trackbacks/191124.html鍏抽敭鐐癸細
1.鎵懼嚭闂鐨勯掑綊琛ㄨ揪寮?
2.鐒跺悗鏍規嵁琛ㄨ揪寮忥紝鐩存帴杞寲涓虹煩闃典笂鐨勬暟鎹繍綆?

鏈棶棰樼殑閫掑綊琛ㄨ揪寮忎負錛?
L錛籭,j錛界瓑浜?0 ifi錛? 鎴栬?j錛?
絳変簬L錛籭-1,j-1錛斤紜1 ifi>0 ,j>0 ai = bi
絳変簬 max锝汱錛籭,j-1錛? L錛籭-1,j錛斤綕 if i > 0 j>0, ai != bj  闃呰鍏ㄦ枃

fullfocus 2008-04-06 22:51 鍙戣〃璇勮
]]>
[閫掑綊鍜岄摼琛ㄦā鎷焆鍒犻櫎涓涓潪絀虹洰褰曪紝騫舵樉紺烘墍鏈夎鍒犻櫎鐨勬枃浠跺拰鐩綍鍒楄〃http://m.tkk7.com/fullfocus/archive/2008/03/30/189684.htmlfullfocusfullfocusSun, 30 Mar 2008 15:21:00 GMThttp://m.tkk7.com/fullfocus/archive/2008/03/30/189684.htmlhttp://m.tkk7.com/fullfocus/comments/189684.htmlhttp://m.tkk7.com/fullfocus/archive/2008/03/30/189684.html#Feedback0http://m.tkk7.com/fullfocus/comments/commentRss/189684.htmlhttp://m.tkk7.com/fullfocus/services/trackbacks/189684.html絎竴涓槸閫掑綊紼嬪簭錛岀浜屼釜鐢ㄤ竴涓狶inkedList妯℃嫙瀹炵幇錛岋紙java錛?nbsp; 闃呰鍏ㄦ枃

fullfocus 2008-03-30 23:21 鍙戣〃璇勮
]]>
姹傚鏁板厓绱?/title><link>http://m.tkk7.com/fullfocus/archive/2008/03/29/189544.html</link><dc:creator>fullfocus</dc:creator><author>fullfocus</author><pubDate>Sat, 29 Mar 2008 15:03:00 GMT</pubDate><guid>http://m.tkk7.com/fullfocus/archive/2008/03/29/189544.html</guid><wfw:comment>http://m.tkk7.com/fullfocus/comments/189544.html</wfw:comment><comments>http://m.tkk7.com/fullfocus/archive/2008/03/29/189544.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/fullfocus/comments/commentRss/189544.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/fullfocus/services/trackbacks/189544.html</trackback:ping><description><![CDATA[鐢ㄩ掑綊娉?灝鵑掑綊)姹傛渶澶氬厓绱?鍗蟲壘鍑哄嚭鐜版鏁板ぇ浜巒/2鐨勫厓绱?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, 128, 128);"> 1</span> <span style="color: rgb(0, 0, 0);">#include </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">stdio.h</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> majority(</span><span style="color: rgb(0, 0, 255);">int</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, 255);">int</span><span style="color: rgb(0, 0, 0);"> );<br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> main()<br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 0);">{<br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">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);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> c </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);"> 8</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);"> data [] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> {</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);">5</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);">5</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);">2</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);">2</span><span style="color: rgb(0, 0, 0);">};<br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> maj </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> majority(data,</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);">7</span><span style="color: rgb(0, 0, 0);">);<br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 0);">    </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);"> </span><span style="color: rgb(0, 0, 0);">7</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 /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(0, 0, 0);">    {<br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(maj </span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);"> data[i])<br /> </span><span style="color: rgb(0, 128, 128);">13</span> <span style="color: rgb(0, 0, 0);">           c</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);">14</span> <span style="color: rgb(0, 0, 0);">    }    <br /> </span><span style="color: rgb(0, 128, 128);">15</span> <span style="color: rgb(0, 0, 0);">    printf(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">The majority num of this array is: %d\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">, c</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);">maj:</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br /> </span><span style="color: rgb(0, 128, 128);">16</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);">17</span> <span style="color: rgb(0, 0, 0);">}<br /> </span><span style="color: rgb(0, 128, 128);">18</span> <span style="color: rgb(0, 128, 0);">/*</span><span style="color: rgb(0, 128, 0);">s for the begining index, and e for the ending index<br /> </span><span style="color: rgb(0, 128, 128);">19</span> <span style="color: rgb(0, 128, 0);">* * find the cadidate num of majority</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">20</span> <span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> majority(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> data[], </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> s, </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> e)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">begin s = 1, e = n(including)</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">21</span> <span style="color: rgb(0, 0, 0);">{<br /> </span><span style="color: rgb(0, 128, 128);">22</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> c </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> count the candidate majority num</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">23</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> j; </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">fot the index move on</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">24</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">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);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);">25</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">( j </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> s; j</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> e; j</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)<br /> </span><span style="color: rgb(0, 128, 128);">26</span> <span style="color: rgb(0, 0, 0);">    {<br /> </span><span style="color: rgb(0, 128, 128);">27</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);">( data[s</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);"> data[j])<br /> </span><span style="color: rgb(0, 128, 128);">28</span> <span style="color: rgb(0, 0, 0);">            c</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);">29</span> <span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">30</span> <span style="color: rgb(0, 0, 0);">        {<br /> </span><span style="color: rgb(0, 128, 128);">31</span> <span style="color: rgb(0, 0, 0);">            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">c</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /> </span><span style="color: rgb(0, 128, 128);">32</span> <span style="color: rgb(0, 0, 0);">            </span><span style="color: rgb(0, 0, 255);">break</span><span style="color: rgb(0, 0, 0);">;    <br /> </span><span style="color: rgb(0, 128, 128);">33</span> <span style="color: rgb(0, 0, 0);">        }        <br /> </span><span style="color: rgb(0, 128, 128);">34</span> <span style="color: rgb(0, 0, 0);">    }    <br /> </span><span style="color: rgb(0, 128, 128);">35</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(c</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /> </span><span style="color: rgb(0, 128, 128);">36</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);"> data[s</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">];<br /> </span><span style="color: rgb(0, 128, 128);">37</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">38</span> <span style="color: rgb(0, 0, 0);">         majority(data, 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);">, e);<br /> </span><span style="color: rgb(0, 128, 128);">39</span> <span style="color: rgb(0, 0, 0);">            <br /> </span><span style="color: rgb(0, 128, 128);">40</span> <span style="color: rgb(0, 0, 0);">}</span> </div> <br /> <br /> <img src ="http://m.tkk7.com/fullfocus/aggbug/189544.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/fullfocus/" target="_blank">fullfocus</a> 2008-03-29 23:03 <a href="http://m.tkk7.com/fullfocus/archive/2008/03/29/189544.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>絎竴嬈″啓榪欎箞澶氫唬鐮乢!!--綰痗鍝堝か鏇間唬鐮佸疄鐜幫紙鐢ㄤ簡鏈灝忓爢錛?/title><link>http://m.tkk7.com/fullfocus/archive/2008/03/28/189375.html</link><dc:creator>fullfocus</dc:creator><author>fullfocus</author><pubDate>Fri, 28 Mar 2008 15:29:00 GMT</pubDate><guid>http://m.tkk7.com/fullfocus/archive/2008/03/28/189375.html</guid><wfw:comment>http://m.tkk7.com/fullfocus/comments/189375.html</wfw:comment><comments>http://m.tkk7.com/fullfocus/archive/2008/03/28/189375.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://m.tkk7.com/fullfocus/comments/commentRss/189375.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/fullfocus/services/trackbacks/189375.html</trackback:ping><description><![CDATA[     鎽樿: 浠ュ墠閮芥槸鍦ㄤ竴涓枃浠墮噷鍐欎唬鐮佺殑錛岀涓嬈$敤浜嗚繖涔堝鏂囦歡錛?涓猒!!錛夛紝鍝堬紝寰堟湁鎴愬氨鎰熼樋錛岃繕鐔熸倝浜唋inux涓嬬殑緙栫▼鐜錛実cc,gdb閮芥槸寰堝ソ濂藉己澶х殑涓滀笢錛岃寰椾笅嬈″鐢ㄧ敤錛?鏈変笉瓚充箣澶勬湜鍚勪綅楂樻墜鎸囨闃匡紒錛侊紒 huffman.h Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.Code...  <a href='http://m.tkk7.com/fullfocus/archive/2008/03/28/189375.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/fullfocus/aggbug/189375.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/fullfocus/" target="_blank">fullfocus</a> 2008-03-28 23:29 <a href="http://m.tkk7.com/fullfocus/archive/2008/03/28/189375.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://goldwellib.com" target="_blank">国产午夜免费高清久久影院</a>| <a href="http://zs0451.com" target="_blank">亚洲AV第一成肉网</a>| <a href="http://686kp.com" target="_blank">久99久无码精品视频免费播放</a>| <a href="http://imfakaixin.com" target="_blank">无码国产亚洲日韩国精品视频一区二区三区 </a>| <a href="http://449892.com" target="_blank">97国免费在线视频</a>| <a href="http://yeyaweiban.com" target="_blank">不卡精品国产_亚洲人成在线</a>| <a href="http://686kp.com" target="_blank">国产免费人成视频在线播放播</a>| <a href="http://daohang123456.com" target="_blank">国产精品亚洲精品日韩已方 </a>| <a href="http://580jp.com" target="_blank">18女人腿打开无遮掩免费</a>| <a href="http://0354888.com" target="_blank">亚洲高清在线mv</a>| <a href="http://hdznzdh.com" target="_blank">中文字幕av无码无卡免费</a>| <a href="http://601508.com" target="_blank">亚洲熟妇无码AV</a>| <a href="http://c7vl.com" target="_blank">亚洲精品国产精品乱码不卡 </a>| <a href="http://by22877.com" target="_blank">自拍日韩亚洲一区在线</a>| <a href="http://g8zb.com" target="_blank">国产91在线免费</a>| <a href="http://18eeuus.com" target="_blank">精品一区二区三区高清免费观看 </a>| <a href="http://szq18888.com" target="_blank">最近免费最新高清中文字幕韩国</a>| <a href="http://zz1965.com" target="_blank">亚洲色图.com</a>| <a href="http://www91v.com" target="_blank">永久免费毛片手机版在线看</a>| <a href="http://jte-sh.com" target="_blank">一级毛片aa高清免费观看</a>| <a href="http://caocl1024liu.com" target="_blank">亚洲女同成av人片在线观看</a>| <a href="http://tzfzs.com" target="_blank">中文字幕在线免费观看</a>| <a href="http://8654123.com" target="_blank">亚洲人成网站在线播放2019</a>| <a href="http://qingdaostf.com" target="_blank">亚洲A∨精品一区二区三区</a>| <a href="http://dasheng178.com" target="_blank">久久久精品午夜免费不卡</a>| <a href="http://dingdingduo.com" target="_blank">亚洲乱码无限2021芒果</a>| <a href="http://fanhaogo.com" target="_blank">亚洲A丁香五香天堂网</a>| <a href="http://qvod-player.com" target="_blank">光棍天堂免费手机观看在线观看</a>| <a href="http://xingdagx.com" target="_blank">亚洲成a人片在线观看中文app</a>| <a href="http://pjszlw.com" target="_blank">国产免费无遮挡精品视频</a>| <a href="http://225ck.com" target="_blank">成全高清在线观看免费</a>| <a href="http://01shanzhai.com" target="_blank">亚洲人xxx日本人18</a>| <a href="http://902578.com" target="_blank">国产AV无码专区亚洲AV漫画 </a>| <a href="http://hezuoedu.com" target="_blank">久久久久久亚洲精品不卡</a>| <a href="http://xf002.com" target="_blank">性xxxxx大片免费视频</a>| <a href="http://5r7b.com" target="_blank">亚洲第一成年免费网站</a>| <a href="http://583s.com" target="_blank">亚洲av日韩av无码</a>| <a href="http://89kino.com" target="_blank">国产又黄又爽又刺激的免费网址</a>| <a href="http://wwwayx2026.com" target="_blank">91福利免费网站在线观看</a>| <a href="http://shyangpuks.com" target="_blank">亚洲AV男人的天堂在线观看</a>| <a href="http://jlzjjy.com" 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>