﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Darren-随笔分类-搜索</title><link>http://www.cppblog.com/Darren/category/12422.html</link><description>C++ 及算法</description><language>zh-cn</language><lastBuildDate>Fri, 27 Nov 2009 14:02:09 GMT</lastBuildDate><pubDate>Fri, 27 Nov 2009 14:02:09 GMT</pubDate><ttl>60</ttl><item><title>Pku   1065   Wooden Sticks</title><link>http://www.cppblog.com/Darren/archive/2008/10/30/65577.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Thu, 30 Oct 2008 12:55:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/10/30/65577.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/65577.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/10/30/65577.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/65577.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/65577.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #000000">#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">stdio.h</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">stdlib.h</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #0000ff">string</span>
				<span style="COLOR: #000000">.h</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #0000ff">#define</span>
				<span style="COLOR: #000000"> N 5001</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #0000ff">struct</span>
				<span style="COLOR: #000000"> Node<br />{<br />    </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> length;<br />    </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> weight;<br />};<br /><br /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> n;<br />Node d[N];<br /></span>
				<span style="COLOR: #0000ff">bool</span>
				<span style="COLOR: #000000"> visite[N];<br /><br /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> cmp( </span>
				<span style="COLOR: #0000ff">const</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> a, </span>
				<span style="COLOR: #0000ff">const</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> b )<br />{<br />    Node</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> ta</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> (Node</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">)a;<br />    Node</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> tb</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> (Node</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">)b;<br />    <br />    </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( ta</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">length</span>
				<span style="COLOR: #000000">==</span>
				<span style="COLOR: #000000"> tb</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">length ) </span>
				<span style="COLOR: #0000ff">return</span>
				<span style="COLOR: #000000"> ta</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">weight</span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000"> tb</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">weight;<br />    <br />    </span>
				<span style="COLOR: #0000ff">return</span>
				<span style="COLOR: #000000"> ta</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">length</span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000"> tb</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">length;<br />}<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"> test;<br />    scanf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">test);<br />    <br />    </span>
				<span style="COLOR: #0000ff">while</span>
				<span style="COLOR: #000000">( test</span>
				<span style="COLOR: #000000">--</span>
				<span style="COLOR: #000000"> )<br />    {<br />        scanf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">n );<br />        </span>
				<span style="COLOR: #0000ff">for</span>
				<span style="COLOR: #000000">( </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">; i</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000"> n; </span>
				<span style="COLOR: #000000">++</span>
				<span style="COLOR: #000000">i )<br />        scanf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d%d</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,     </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">d[i].length, </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">d[i].weight );<br />        <br />        qsort( d, n, </span>
				<span style="COLOR: #0000ff">sizeof</span>
				<span style="COLOR: #000000">(d[</span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">]), cmp );<br />        memset( visite, </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #0000ff">sizeof</span>
				<span style="COLOR: #000000">(visite) );<br />    <br />        </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> b</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> d[</span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">].weight;<br />        </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> num</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"> k</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">;<br />        <br />        </span>
				<span style="COLOR: #0000ff">while</span>
				<span style="COLOR: #000000">( </span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000"> )<br />        {<br />            </span>
				<span style="COLOR: #0000ff">bool</span>
				<span style="COLOR: #000000"> ok</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">;<br />            <br />            </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( k</span>
				<span style="COLOR: #000000">==</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000"> ) </span>
				<span style="COLOR: #0000ff">break</span>
				<span style="COLOR: #000000">;<br />            b</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> d[k].weight;   num</span>
				<span style="COLOR: #000000">++</span>
				<span style="COLOR: #000000">;<br />            <br />            </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> be</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> k;  k</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">;<br />            <br />            </span>
				<span style="COLOR: #0000ff">for</span>
				<span style="COLOR: #000000">( </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> i</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> be; i</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000"> n; </span>
				<span style="COLOR: #000000">++</span>
				<span style="COLOR: #000000">i )<br />            {<br />                </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( d[i].weight</span>
				<span style="COLOR: #000000">&gt;=</span>
				<span style="COLOR: #000000"> b </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">!</span>
				<span style="COLOR: #000000">visite[i] )<br />                {<br />                    visite[i]</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">;<br />                    b</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> d[i].weight;<br />                }<br />                </span>
				<span style="COLOR: #0000ff">else</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( </span>
				<span style="COLOR: #000000">!</span>
				<span style="COLOR: #000000">ok </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">!</span>
				<span style="COLOR: #000000">visite[i] )   {   k</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> i;  ok</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">;  }<br />            } <br />        }<br />        <br />        printf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d\n</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, num );<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 /></span>
		</div>
<img src ="http://www.cppblog.com/Darren/aggbug/65577.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-10-30 20:55 <a href="http://www.cppblog.com/Darren/archive/2008/10/30/65577.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Pku  2488   A Knight's Journey</title><link>http://www.cppblog.com/Darren/archive/2008/10/14/63948.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Tue, 14 Oct 2008 04:00:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/10/14/63948.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/63948.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/10/14/63948.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/63948.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/63948.html</trackback:ping><description><![CDATA[
		<p> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #000000">#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">stdio.h</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">stdlib.h</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #0000ff">#define</span>
				<span style="COLOR: #000000"> pause system("pause")</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> r, c;<br /></span>
				<span style="COLOR: #0000ff">bool</span>
				<span style="COLOR: #000000"> ok</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">;<br /><br /></span>
				<span style="COLOR: #0000ff">bool</span>
				<span style="COLOR: #000000"> visite[</span>
				<span style="COLOR: #000000">100</span>
				<span style="COLOR: #000000">][</span>
				<span style="COLOR: #000000">100</span>
				<span style="COLOR: #000000">];<br /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000">  px[</span>
				<span style="COLOR: #000000">50</span>
				<span style="COLOR: #000000">], py[</span>
				<span style="COLOR: #000000">50</span>
				<span style="COLOR: #000000">];<br /><br /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> yy[</span>
				<span style="COLOR: #000000">8</span>
				<span style="COLOR: #000000">]</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> { </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">2</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">2</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">2</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">2</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">1</span>
				<span style="COLOR: #000000"> };<br /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> xx[</span>
				<span style="COLOR: #000000">8</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">2</span>
				<span style="COLOR: #000000">,</span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">2</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">1</span>
				<span style="COLOR: #000000">,  </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">,  </span>
				<span style="COLOR: #000000">2</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">2</span>
				<span style="COLOR: #000000"> };<br /><br /></span>
				<span style="COLOR: #0000ff">bool</span>
				<span style="COLOR: #000000"> isok( </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> x, </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> y )<br />{<br />    </span>
				<span style="COLOR: #0000ff">return</span>
				<span style="COLOR: #000000"> x</span>
				<span style="COLOR: #000000">&gt;=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> x</span>
				<span style="COLOR: #000000">&lt;=</span>
				<span style="COLOR: #000000"> r </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> y</span>
				<span style="COLOR: #000000">&gt;=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> y</span>
				<span style="COLOR: #000000">&lt;=</span>
				<span style="COLOR: #000000"> c;<br />}<br /><br /></span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000"> dfs( </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> x, </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> y, </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> length )<br />{<br />    px[length]</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> x, py[length]</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> y;<br />    <br />    </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( length</span>
				<span style="COLOR: #000000">==</span>
				<span style="COLOR: #000000"> r</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> c )<br />    {<br />        ok</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">;<br />        </span>
				<span style="COLOR: #0000ff">return</span>
				<span style="COLOR: #000000">;<br />    }<br />    <br />    </span>
				<span style="COLOR: #0000ff">for</span>
				<span style="COLOR: #000000">( </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">; i</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">8</span>
				<span style="COLOR: #000000">; </span>
				<span style="COLOR: #000000">++</span>
				<span style="COLOR: #000000">i )<br />    {<br />        </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> tx</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> xx[i]</span>
				<span style="COLOR: #000000">+</span>
				<span style="COLOR: #000000"> x, ty</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> yy[i]</span>
				<span style="COLOR: #000000">+</span>
				<span style="COLOR: #000000"> y;<br />        <br />        </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( isok(tx,ty) </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">!</span>
				<span style="COLOR: #000000">visite[tx][ty] </span>
				<span style="COLOR: #000000">&amp;&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">!</span>
				<span style="COLOR: #000000">ok )<br />        {<br />            visite[tx][ty]</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">;<br />            <br />            dfs( tx, ty, length</span>
				<span style="COLOR: #000000">+</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000"> );<br />            <br />            visite[tx][ty]</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">;<br />        }<br />    }<br />}<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"> test;<br />    scanf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">test);<br />    <br />    </span>
				<span style="COLOR: #0000ff">for</span>
				<span style="COLOR: #000000">( </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> t</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">; t</span>
				<span style="COLOR: #000000">&lt;=</span>
				<span style="COLOR: #000000"> test; </span>
				<span style="COLOR: #000000">++</span>
				<span style="COLOR: #000000">t )<br />    {<br />        scanf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d%d</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">c,</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">r);<br />        <br />        visite[</span>
				<span style="COLOR: #000000">1</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: #0000ff">true</span>
				<span style="COLOR: #000000">; ok</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">;<br />        dfs( </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000"> );<br />        <br />        printf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Scenario #%d:\n</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, t );<br />        <br />        </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( ok )<br />        {<br />            </span>
				<span style="COLOR: #0000ff">for</span>
				<span style="COLOR: #000000">( </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">1</span>
				<span style="COLOR: #000000">; i</span>
				<span style="COLOR: #000000">&lt;=</span>
				<span style="COLOR: #000000"> r</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> c; </span>
				<span style="COLOR: #000000">++</span>
				<span style="COLOR: #000000">i )<br />            {<br />                printf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%c</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, px[i]</span>
				<span style="COLOR: #000000">+</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">A</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000"> );<br />                printf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">%d</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, py[i] );<br />            }<br />            printf(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">\n</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">);<br />        }<br />        </span>
				<span style="COLOR: #0000ff">else</span>
				<span style="COLOR: #000000"> puts(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">impossible</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">);<br />        <br />        </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000">( t</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000"> test ) puts(</span>
				<span style="COLOR: #000000">""</span>
				<span style="COLOR: #000000">);<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 /></span>
		</div>
<img src ="http://www.cppblog.com/Darren/aggbug/63948.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-10-14 12:00 <a href="http://www.cppblog.com/Darren/archive/2008/10/14/63948.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PKU 1018   Communication System</title><link>http://www.cppblog.com/Darren/archive/2008/10/01/63140.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Wed, 01 Oct 2008 14:06:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/10/01/63140.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/63140.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/10/01/63140.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/63140.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/63140.html</trackback:ping><description><![CDATA[
		<p> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">iostream</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">limits</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">using</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">namespace</span>
				<span style="COLOR: #000000"> std;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">struct</span>
				<span style="COLOR: #000000"> Node<br /><img id="Codehighlighter1_88_182_Open_Image" onclick="this.style.display='none'; Codehighlighter1_88_182_Open_Text.style.display='none'; Codehighlighter1_88_182_Closed_Image.style.display='inline'; Codehighlighter1_88_182_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_88_182_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_88_182_Closed_Text.style.display='none'; Codehighlighter1_88_182_Open_Image.style.display='inline'; Codehighlighter1_88_182_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_88_182_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_88_182_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> broad, price;<br /><img id="Codehighlighter1_122_123_Open_Image" onclick="this.style.display='none'; Codehighlighter1_122_123_Open_Text.style.display='none'; Codehighlighter1_122_123_Closed_Image.style.display='inline'; Codehighlighter1_122_123_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_122_123_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_122_123_Closed_Text.style.display='none'; Codehighlighter1_122_123_Open_Image.style.display='inline'; Codehighlighter1_122_123_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    Node()</span>
						<span id="Codehighlighter1_122_123_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_122_123_Open_Text">
								<span style="COLOR: #000000">{}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    Node(</span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">a,</span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">b)<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        :broad(a),price(b)<br /><img id="Codehighlighter1_179_180_Open_Image" onclick="this.style.display='none'; Codehighlighter1_179_180_Open_Text.style.display='none'; Codehighlighter1_179_180_Closed_Image.style.display='inline'; Codehighlighter1_179_180_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_179_180_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_179_180_Closed_Text.style.display='none'; Codehighlighter1_179_180_Open_Image.style.display='inline'; Codehighlighter1_179_180_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_179_180_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_179_180_Open_Text">
								<span style="COLOR: #000000">{}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />Node data[</span>
				<span style="COLOR: #000000">100</span>
				<span style="COLOR: #000000">][</span>
				<span style="COLOR: #000000">100</span>
				<span style="COLOR: #000000">];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000">  length[</span>
				<span style="COLOR: #000000">100</span>
				<span style="COLOR: #000000">];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> main()<br /><img id="Codehighlighter1_238_1661_Open_Image" onclick="this.style.display='none'; Codehighlighter1_238_1661_Open_Text.style.display='none'; Codehighlighter1_238_1661_Closed_Image.style.display='inline'; Codehighlighter1_238_1661_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_238_1661_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_238_1661_Closed_Text.style.display='none'; Codehighlighter1_238_1661_Open_Image.style.display='inline'; Codehighlighter1_238_1661_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_238_1661_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_238_1661_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> test;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    scanf(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">%d</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">test);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">while</span>
						<span style="COLOR: #000000">( test</span>
						<span style="COLOR: #000000">--</span>
						<span style="COLOR: #000000"> )<br /><img id="Codehighlighter1_302_1644_Open_Image" onclick="this.style.display='none'; Codehighlighter1_302_1644_Open_Text.style.display='none'; Codehighlighter1_302_1644_Closed_Image.style.display='inline'; Codehighlighter1_302_1644_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_302_1644_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_302_1644_Closed_Text.style.display='none'; Codehighlighter1_302_1644_Open_Image.style.display='inline'; Codehighlighter1_302_1644_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_302_1644_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_302_1644_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> n;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">set</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000"> br;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        scanf(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">%d</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000">n);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000"> ( </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">; i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> n; </span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">i )<br /><img id="Codehighlighter1_410_725_Open_Image" onclick="this.style.display='none'; Codehighlighter1_410_725_Open_Text.style.display='none'; Codehighlighter1_410_725_Closed_Image.style.display='inline'; Codehighlighter1_410_725_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_410_725_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_410_725_Closed_Text.style.display='none'; Codehighlighter1_410_725_Open_Image.style.display='inline'; Codehighlighter1_410_725_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_410_725_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_410_725_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">int</span>
										<span style="COLOR: #000000"> d,x,y;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            scanf(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">%d</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">&amp;</span>
										<span style="COLOR: #000000">d);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            length[i]</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> d;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000"> ( </span>
										<span style="COLOR: #0000ff">int</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">; j</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000"> d; </span>
										<span style="COLOR: #000000">++</span>
										<span style="COLOR: #000000">j )<br /><img id="Codehighlighter1_542_715_Open_Image" onclick="this.style.display='none'; Codehighlighter1_542_715_Open_Text.style.display='none'; Codehighlighter1_542_715_Closed_Image.style.display='inline'; Codehighlighter1_542_715_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_542_715_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_542_715_Closed_Text.style.display='none'; Codehighlighter1_542_715_Open_Image.style.display='inline'; Codehighlighter1_542_715_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
										<span id="Codehighlighter1_542_715_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.cppblog.com/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_542_715_Open_Text">
												<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                scanf(</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">%d%d</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">,</span>
												<span style="COLOR: #000000">&amp;</span>
												<span style="COLOR: #000000">x,</span>
												<span style="COLOR: #000000">&amp;</span>
												<span style="COLOR: #000000">y);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                data[i][j]</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> Node(x,y);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                br.insert(x);    </span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">   Save all broad , use set to avoid repeating</span>
												<span style="COLOR: #008000">
														<br />
														<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />
												</span>
												<span style="COLOR: #000000">            }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
												<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">set</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">::iterator pos;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">double</span>
								<span style="COLOR: #000000"> max</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> numeric_limits</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #0000ff">double</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">::min();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000"> ( pos</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> br.begin (); pos</span>
								<span style="COLOR: #000000">!=</span>
								<span style="COLOR: #000000"> br.end (); </span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">pos )   </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">   for every broad</span>
								<span style="COLOR: #008000">
										<br />
										<img id="Codehighlighter1_899_1603_Open_Image" onclick="this.style.display='none'; Codehighlighter1_899_1603_Open_Text.style.display='none'; Codehighlighter1_899_1603_Closed_Image.style.display='inline'; Codehighlighter1_899_1603_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_899_1603_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_899_1603_Closed_Text.style.display='none'; Codehighlighter1_899_1603_Open_Image.style.display='inline'; Codehighlighter1_899_1603_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">        </span>
								<span id="Codehighlighter1_899_1603_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_899_1603_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">int</span>
										<span style="COLOR: #000000">   t</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">*</span>
										<span style="COLOR: #000000">pos;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">int</span>
										<span style="COLOR: #000000">   total</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">bool</span>
										<span style="COLOR: #000000">  isok</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">false</span>
										<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000"> ( </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">; i</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000"> n; </span>
										<span style="COLOR: #000000">++</span>
										<span style="COLOR: #000000">i )   </span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">  n devices</span>
										<span style="COLOR: #008000">
												<br />
												<img id="Codehighlighter1_1056_1464_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1056_1464_Open_Text.style.display='none'; Codehighlighter1_1056_1464_Closed_Image.style.display='inline'; Codehighlighter1_1056_1464_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_1056_1464_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1056_1464_Closed_Text.style.display='none'; Codehighlighter1_1056_1464_Open_Image.style.display='inline'; Codehighlighter1_1056_1464_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />
										</span>
										<span style="COLOR: #000000">            </span>
										<span id="Codehighlighter1_1056_1464_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.cppblog.com/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_1056_1464_Open_Text">
												<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">int</span>
												<span style="COLOR: #000000"> M</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> INT_MAX;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">for</span>
												<span style="COLOR: #000000"> ( </span>
												<span style="COLOR: #0000ff">int</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">; j</span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #000000"> length[i]; </span>
												<span style="COLOR: #000000">++</span>
												<span style="COLOR: #000000">j )<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                    </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> ( data[i][j].broad</span>
												<span style="COLOR: #000000">&gt;=</span>
												<span style="COLOR: #000000"> t </span>
												<span style="COLOR: #000000">&amp;&amp;</span>
												<span style="COLOR: #000000"> data[i][j].price</span>
												<span style="COLOR: #000000">&lt;</span>
												<span style="COLOR: #000000"> M )<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                        M</span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> data[i][j].price;      </span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000">   find  the min price</span>
												<span style="COLOR: #008000">
														<br />
														<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
												</span>
												<span style="COLOR: #000000">
														<br />
														<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000"> ( M</span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #000000"> INT_MAX )<br /><img id="Codehighlighter1_1341_1418_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1341_1418_Open_Text.style.display='none'; Codehighlighter1_1341_1418_Closed_Image.style.display='inline'; Codehighlighter1_1341_1418_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1341_1418_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1341_1418_Closed_Text.style.display='none'; Codehighlighter1_1341_1418_Open_Image.style.display='inline'; Codehighlighter1_1341_1418_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
												<span id="Codehighlighter1_1341_1418_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
														<img src="http://www.cppblog.com/images/dot.gif" />
												</span>
												<span id="Codehighlighter1_1341_1418_Open_Text">
														<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                    isok</span>
														<span style="COLOR: #000000">=</span>
														<span style="COLOR: #000000"> </span>
														<span style="COLOR: #0000ff">true</span>
														<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                    </span>
														<span style="COLOR: #0000ff">break</span>
														<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span>
												</span>
												<span style="COLOR: #000000">
														<br />
														<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                total</span>
												<span style="COLOR: #000000">+=</span>
												<span style="COLOR: #000000"> M;     <br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
												<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
												<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> ( isok ) </span>
										<span style="COLOR: #0000ff">continue</span>
										<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000"> ( (</span>
										<span style="COLOR: #0000ff">double</span>
										<span style="COLOR: #000000">)t</span>
										<span style="COLOR: #000000">/</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #0000ff">double</span>
										<span style="COLOR: #000000">)total</span>
										<span style="COLOR: #000000">&gt;</span>
										<span style="COLOR: #000000"> max ) max</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #0000ff">double</span>
										<span style="COLOR: #000000">)t</span>
										<span style="COLOR: #000000">/</span>
										<span style="COLOR: #000000"> (</span>
										<span style="COLOR: #0000ff">double</span>
										<span style="COLOR: #000000">)total;   </span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">  update</span>
										<span style="COLOR: #008000">
												<br />
												<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />
										</span>
										<span style="COLOR: #000000">        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        printf(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">%.3lf\n</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">, max );<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
		</div>
<img src ="http://www.cppblog.com/Darren/aggbug/63140.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-10-01 22:06 <a href="http://www.cppblog.com/Darren/archive/2008/10/01/63140.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>pku 1017  Packets</title><link>http://www.cppblog.com/Darren/archive/2008/10/01/63138.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Wed, 01 Oct 2008 11:42:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/10/01/63138.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/63138.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/10/01/63138.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/63138.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/63138.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: #include 				&lt;				iostream				&gt;																																				using				 				namespace				 std;				int				  d[				6				];				int				 main()									...&nbsp;&nbsp;<a href='http://www.cppblog.com/Darren/archive/2008/10/01/63138.html'>阅读全文</a><img src ="http://www.cppblog.com/Darren/aggbug/63138.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-10-01 19:42 <a href="http://www.cppblog.com/Darren/archive/2008/10/01/63138.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PKU  1014  Dividing</title><link>http://www.cppblog.com/Darren/archive/2008/10/01/63129.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Wed, 01 Oct 2008 07:38:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/10/01/63129.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/63129.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/10/01/63129.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/63129.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/63129.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">iostream</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">using</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">namespace</span>
				<span style="COLOR: #000000"> std;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000">  d[</span>
				<span style="COLOR: #000000">6</span>
				<span style="COLOR: #000000">];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">bool</span>
				<span style="COLOR: #000000"> isok</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000">  total</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000"> Try( </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> i, </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> total )<br /><img id="Codehighlighter1_117_322_Open_Image" onclick="this.style.display='none'; Codehighlighter1_117_322_Open_Text.style.display='none'; Codehighlighter1_117_322_Closed_Image.style.display='inline'; Codehighlighter1_117_322_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_117_322_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_117_322_Closed_Text.style.display='none'; Codehighlighter1_117_322_Open_Image.style.display='inline'; Codehighlighter1_117_322_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_117_322_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_117_322_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> ( total</span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000"> )<br /><img id="Codehighlighter1_138_165_Open_Image" onclick="this.style.display='none'; Codehighlighter1_138_165_Open_Text.style.display='none'; Codehighlighter1_138_165_Closed_Image.style.display='inline'; Codehighlighter1_138_165_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_138_165_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_138_165_Closed_Text.style.display='none'; Codehighlighter1_138_165_Open_Image.style.display='inline'; Codehighlighter1_138_165_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_138_165_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_138_165_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        isok</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">true</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> ( i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000"> ) </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000"> ( </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> j</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> d[i]; j</span>
						<span style="COLOR: #000000">&gt;=</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"> )<br /><img id="Codehighlighter1_224_320_Open_Image" onclick="this.style.display='none'; Codehighlighter1_224_320_Open_Text.style.display='none'; Codehighlighter1_224_320_Closed_Image.style.display='inline'; Codehighlighter1_224_320_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_224_320_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_224_320_Closed_Text.style.display='none'; Codehighlighter1_224_320_Open_Image.style.display='inline'; Codehighlighter1_224_320_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_224_320_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_224_320_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( isok ) </span>
								<span style="COLOR: #0000ff">break</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( total</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> j</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">)</span>
								<span style="COLOR: #000000">&gt;=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&amp;&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #000000">isok )<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            Try( i</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">, total</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000"> j</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">) );<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> main()<br /><img id="Codehighlighter1_336_890_Open_Image" onclick="this.style.display='none'; Codehighlighter1_336_890_Open_Text.style.display='none'; Codehighlighter1_336_890_Closed_Image.style.display='inline'; Codehighlighter1_336_890_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_336_890_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_336_890_Closed_Text.style.display='none'; Codehighlighter1_336_890_Open_Image.style.display='inline'; Codehighlighter1_336_890_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_336_890_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_336_890_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> num</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">while</span>
						<span style="COLOR: #000000">( scanf(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">%d%d%d%d%d%d</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">, d</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">, d</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">, d</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">, d</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">3</span>
						<span style="COLOR: #000000">, d</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">4</span>
						<span style="COLOR: #000000">, d</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">5</span>
						<span style="COLOR: #000000"> ),<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />           d[</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> d[</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> d[</span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> d[</span>
						<span style="COLOR: #000000">3</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> d[</span>
						<span style="COLOR: #000000">4</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> d[</span>
						<span style="COLOR: #000000">5</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 /><img id="Codehighlighter1_466_876_Open_Image" onclick="this.style.display='none'; Codehighlighter1_466_876_Open_Text.style.display='none'; Codehighlighter1_466_876_Closed_Image.style.display='inline'; Codehighlighter1_466_876_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_466_876_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_466_876_Closed_Text.style.display='none'; Codehighlighter1_466_876_Open_Image.style.display='inline'; Codehighlighter1_466_876_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_466_876_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_466_876_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        total</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000"> ( </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">; i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">6</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">i )<br /><img id="Codehighlighter1_512_554_Open_Image" onclick="this.style.display='none'; Codehighlighter1_512_554_Open_Text.style.display='none'; Codehighlighter1_512_554_Closed_Image.style.display='inline'; Codehighlighter1_512_554_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_512_554_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_512_554_Closed_Text.style.display='none'; Codehighlighter1_512_554_Open_Image.style.display='inline'; Codehighlighter1_512_554_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_512_554_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_512_554_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            d[i]</span>
										<span style="COLOR: #000000">%=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">60</span>
										<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            total</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">)</span>
										<span style="COLOR: #000000">*</span>
										<span style="COLOR: #000000"> d[i];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( total</span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000"> )<br /><img id="Codehighlighter1_577_686_Open_Image" onclick="this.style.display='none'; Codehighlighter1_577_686_Open_Text.style.display='none'; Codehighlighter1_577_686_Closed_Image.style.display='inline'; Codehighlighter1_577_686_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_577_686_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_577_686_Closed_Text.style.display='none'; Codehighlighter1_577_686_Open_Image.style.display='inline'; Codehighlighter1_577_686_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_577_686_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_577_686_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            printf(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Collection #%d:\n</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,num</span>
										<span style="COLOR: #000000">++</span>
										<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            printf(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Can't be divided.\n</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            printf(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">\n</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">continue</span>
										<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        isok</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">false</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        Try( </span>
								<span style="COLOR: #000000">5</span>
								<span style="COLOR: #000000">, total</span>
								<span style="COLOR: #000000">/</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000"> );<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        printf(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Collection #%d:\n</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,num</span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> ( </span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #000000">isok )        <br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            printf(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Can't be divided.\n</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            printf(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Can be divided.\n</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        printf(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">\n</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
		</div>
<img src ="http://www.cppblog.com/Darren/aggbug/63129.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-10-01 15:38 <a href="http://www.cppblog.com/Darren/archive/2008/10/01/63129.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Open the Lock </title><link>http://www.cppblog.com/Darren/archive/2008/08/19/59357.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Tue, 19 Aug 2008 08:38:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/08/19/59357.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/59357.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/08/19/59357.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/59357.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/59357.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Problem description 		Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus 1 to any ...&nbsp;&nbsp;<a href='http://www.cppblog.com/Darren/archive/2008/08/19/59357.html'>阅读全文</a><img src ="http://www.cppblog.com/Darren/aggbug/59357.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-08-19 16:38 <a href="http://www.cppblog.com/Darren/archive/2008/08/19/59357.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Sudoku </title><link>http://www.cppblog.com/Darren/archive/2008/08/19/59296.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Tue, 19 Aug 2008 00:14:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/08/19/59296.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/59296.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/08/19/59296.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/59296.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/59296.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 出处：     http://acm.hnu.cn:8080/online/?action=problem&amp;type=show&amp;id=11203&amp;courseid=0																																										Sudoku																																			...&nbsp;&nbsp;<a href='http://www.cppblog.com/Darren/archive/2008/08/19/59296.html'>阅读全文</a><img src ="http://www.cppblog.com/Darren/aggbug/59296.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-08-19 08:14 <a href="http://www.cppblog.com/Darren/archive/2008/08/19/59296.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Change binary string </title><link>http://www.cppblog.com/Darren/archive/2008/08/18/Darren.html</link><dc:creator>Darren</dc:creator><author>Darren</author><pubDate>Mon, 18 Aug 2008 12:14:00 GMT</pubDate><guid>http://www.cppblog.com/Darren/archive/2008/08/18/Darren.html</guid><wfw:comment>http://www.cppblog.com/Darren/comments/59266.html</wfw:comment><comments>http://www.cppblog.com/Darren/archive/2008/08/18/Darren.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Darren/comments/commentRss/59266.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Darren/services/trackbacks/59266.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Problem description																																																There are two binary strings, their length is 8, you should change the first to the second through several approach. You ne...&nbsp;&nbsp;<a href='http://www.cppblog.com/Darren/archive/2008/08/18/Darren.html'>阅读全文</a><img src ="http://www.cppblog.com/Darren/aggbug/59266.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Darren/" target="_blank">Darren</a> 2008-08-18 20:14 <a href="http://www.cppblog.com/Darren/archive/2008/08/18/Darren.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>