锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线视频欧美日韩精品,性欧美大战久久久久久久久,在线视频精品一http://www.shnenglu.com/Dreams/category/10416.htmlzh-cnThu, 07 May 2009 23:06:29 GMTThu, 07 May 2009 23:06:29 GMT60zju 3175 Number of Containershttp://www.shnenglu.com/Dreams/archive/2009/05/07/82141.htmlDreamSkyDreamSkyThu, 07 May 2009 04:07:00 GMThttp://www.shnenglu.com/Dreams/archive/2009/05/07/82141.htmlhttp://www.shnenglu.com/Dreams/comments/82141.htmlhttp://www.shnenglu.com/Dreams/archive/2009/05/07/82141.html#Feedback0http://www.shnenglu.com/Dreams/comments/commentRss/82141.htmlhttp://www.shnenglu.com/Dreams/services/trackbacks/82141.htmlhttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3216
//1858220 2009-05-07 11:33:22 Accepted  3175 C++ 70 184 aslys 
// x*y = n ……
#include<iostream>
#include
<cmath>
using namespace std;
int main()
{
    
int t;
    cin
>>t;
    
while(t--)
    
{
        
int i;
        
long long n,s,sum=0;
        scanf(
"%lld",&n);
        s 
= sqrt((double)n);
        
for(i = 1;i<=s;i++)
            sum 
+= n/i;
        sum 
*= 2;
        sum 
-= s*s;
        sum 
-= n;
        printf(
"%lld\n",sum);
    }

    
return 0;
}


DreamSky 2009-05-07 12:07 鍙戣〃璇勮
]]>
hdu 1267 涓嬫矙鐨勬矙瀛愭湁鍑犵矑錛?/title><link>http://www.shnenglu.com/Dreams/archive/2009/05/05/81929.html</link><dc:creator>DreamSky</dc:creator><author>DreamSky</author><pubDate>Tue, 05 May 2009 04:53:00 GMT</pubDate><guid>http://www.shnenglu.com/Dreams/archive/2009/05/05/81929.html</guid><wfw:comment>http://www.shnenglu.com/Dreams/comments/81929.html</wfw:comment><comments>http://www.shnenglu.com/Dreams/archive/2009/05/05/81929.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Dreams/comments/commentRss/81929.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/Dreams/services/trackbacks/81929.html</trackback:ping><description><![CDATA[<a >http://acm.hdu.edu.cn/showproblem.php?pid=1267</a><br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000"> std;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_51_1658_Open_Image onclick="this.style.display='none'; Codehighlighter1_51_1658_Open_Text.style.display='none'; Codehighlighter1_51_1658_Closed_Image.style.display='inline'; Codehighlighter1_51_1658_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_51_1658_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_51_1658_Closed_Text.style.display='none'; Codehighlighter1_51_1658_Open_Image.style.display='inline'; Codehighlighter1_51_1658_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_51_1658_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_51_1658_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i,j,len</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">,temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img id=Codehighlighter1_103_105_Open_Image onclick="this.style.display='none'; Codehighlighter1_103_105_Open_Text.style.display='none'; Codehighlighter1_103_105_Closed_Image.style.display='inline'; Codehighlighter1_103_105_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_103_105_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_103_105_Closed_Text.style.display='none'; Codehighlighter1_103_105_Open_Image.style.display='inline'; Codehighlighter1_103_105_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> a[</span><span style="COLOR: #000000">201</span><span style="COLOR: #000000">][</span><span style="COLOR: #000000">400</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span id=Codehighlighter1_103_105_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_103_105_Open_Text><span style="COLOR: #000000">{</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">}</span></span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    a[</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">][</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><=</span><span style="COLOR: #000000">200</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">姹?……200鐨勯樁涔?/span><span style="COLOR: #008000"><br><img id=Codehighlighter1_163_465_Open_Image onclick="this.style.display='none'; Codehighlighter1_163_465_Open_Text.style.display='none'; Codehighlighter1_163_465_Closed_Image.style.display='inline'; Codehighlighter1_163_465_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_163_465_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_163_465_Closed_Text.style.display='none'; Codehighlighter1_163_465_Open_Image.style.display='inline'; Codehighlighter1_163_465_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top></span><span style="COLOR: #000000">    </span><span id=Codehighlighter1_163_465_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_163_465_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">len;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            a[i][j] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> a[i</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">][j] </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">,r</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">len;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_268_369_Open_Image onclick="this.style.display='none'; Codehighlighter1_268_369_Open_Text.style.display='none'; Codehighlighter1_268_369_Closed_Image.style.display='inline'; Codehighlighter1_268_369_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_268_369_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_268_369_Closed_Text.style.display='none'; Codehighlighter1_268_369_Open_Image.style.display='inline'; Codehighlighter1_268_369_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_268_369_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_268_369_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            temp </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> a[i][j] </span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"> r;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            a[i][j] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> temp </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            r </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> temp </span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(r)<br><img id=Codehighlighter1_396_459_Open_Image onclick="this.style.display='none'; Codehighlighter1_396_459_Open_Text.style.display='none'; Codehighlighter1_396_459_Closed_Image.style.display='inline'; Codehighlighter1_396_459_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_396_459_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_396_459_Closed_Text.style.display='none'; Codehighlighter1_396_459_Open_Image.style.display='inline'; Codehighlighter1_396_459_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_396_459_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_396_459_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            a[i][len</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> r</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            r </span><span style="COLOR: #000000">/=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> m,n;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(cin</span><span style="COLOR: #000000">>></span><span style="COLOR: #000000">m</span><span style="COLOR: #000000">>></span><span style="COLOR: #000000">n)<br><img id=Codehighlighter1_505_1642_Open_Image onclick="this.style.display='none'; Codehighlighter1_505_1642_Open_Text.style.display='none'; Codehighlighter1_505_1642_Closed_Image.style.display='inline'; Codehighlighter1_505_1642_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_505_1642_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_505_1642_Closed_Text.style.display='none'; Codehighlighter1_505_1642_Open_Image.style.display='inline'; Codehighlighter1_505_1642_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_505_1642_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_505_1642_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        r </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.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        len </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">400</span><span style="COLOR: #000000">;</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">鏀規垚300灝遍敊浜?/span><span style="COLOR: #008000"><br><img id=Codehighlighter1_570_572_Open_Image onclick="this.style.display='none'; Codehighlighter1_570_572_Open_Text.style.display='none'; Codehighlighter1_570_572_Closed_Image.style.display='inline'; Codehighlighter1_570_572_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_570_572_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_570_572_Closed_Text.style.display='none'; Codehighlighter1_570_572_Open_Image.style.display='inline'; Codehighlighter1_570_572_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top></span><span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> b[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span id=Codehighlighter1_570_572_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_570_572_Open_Text><span style="COLOR: #000000">{</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">}</span></span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">len;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_610_718_Open_Image onclick="this.style.display='none'; Codehighlighter1_610_718_Open_Text.style.display='none'; Codehighlighter1_610_718_Closed_Image.style.display='inline'; Codehighlighter1_610_718_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_610_718_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_610_718_Closed_Text.style.display='none'; Codehighlighter1_610_718_Open_Image.style.display='inline'; Codehighlighter1_610_718_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_610_718_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_610_718_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            temp </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> a[m</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n][j]</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">(m</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">n) </span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"> r;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            b[j] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> temp </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            r </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> temp </span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(r)<br><img id=Codehighlighter1_745_805_Open_Image onclick="this.style.display='none'; Codehighlighter1_745_805_Open_Text.style.display='none'; Codehighlighter1_745_805_Closed_Image.style.display='inline'; Codehighlighter1_745_805_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_745_805_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_745_805_Closed_Text.style.display='none'; Codehighlighter1_745_805_Open_Image.style.display='inline'; Codehighlighter1_745_805_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_745_805_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_745_805_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            b[len</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> r</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            r </span><span style="COLOR: #000000">/=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">len</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">>=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_850_965_Open_Image onclick="this.style.display='none'; Codehighlighter1_850_965_Open_Text.style.display='none'; Codehighlighter1_850_965_Closed_Image.style.display='inline'; Codehighlighter1_850_965_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_850_965_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_850_965_Closed_Text.style.display='none'; Codehighlighter1_850_965_Open_Image.style.display='inline'; Codehighlighter1_850_965_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_850_965_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_850_965_Open_Text><span style="COLOR: #000000">{            </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闄ゆ硶浠庨珮浣嶅埌浣庝綅</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">            temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">r</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">b[j];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            b[j]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">(m</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">(m</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">!</span><span style="COLOR: #000000">b[len])        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">澶勭悊楂樹綅鐨勯浂浣?/span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">            len</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">m;i</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">)</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闄!</span><span style="COLOR: #008000"><br><img id=Codehighlighter1_1071_1295_Open_Image onclick="this.style.display='none'; Codehighlighter1_1071_1295_Open_Text.style.display='none'; Codehighlighter1_1071_1295_Closed_Image.style.display='inline'; Codehighlighter1_1071_1295_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1071_1295_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1071_1295_Closed_Text.style.display='none'; Codehighlighter1_1071_1295_Open_Image.style.display='inline'; Codehighlighter1_1071_1295_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top></span><span style="COLOR: #000000">        </span><span id=Codehighlighter1_1071_1295_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1071_1295_Open_Text><span style="COLOR: #000000">{    <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">len,r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">>=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">)  <br><img id=Codehighlighter1_1119_1228_Open_Image onclick="this.style.display='none'; Codehighlighter1_1119_1228_Open_Text.style.display='none'; Codehighlighter1_1119_1228_Closed_Image.style.display='inline'; Codehighlighter1_1119_1228_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1119_1228_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1119_1228_Closed_Text.style.display='none'; Codehighlighter1_1119_1228_Open_Image.style.display='inline'; Codehighlighter1_1119_1228_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>                </span><span id=Codehighlighter1_1119_1228_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1119_1228_Open_Text><span style="COLOR: #000000">{            </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闄ゆ硶浠庨珮浣嶅埌浣庝綅</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">                temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">r</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">b[j];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                b[j]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>                }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">!</span><span style="COLOR: #000000">b[len])        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">澶勭悊楂樹綅鐨勯浂浣?/span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">            len</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">n;i</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">)</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闄!</span><span style="COLOR: #008000"><br><img id=Codehighlighter1_1332_1556_Open_Image onclick="this.style.display='none'; Codehighlighter1_1332_1556_Open_Text.style.display='none'; Codehighlighter1_1332_1556_Closed_Image.style.display='inline'; Codehighlighter1_1332_1556_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1332_1556_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1332_1556_Closed_Text.style.display='none'; Codehighlighter1_1332_1556_Open_Image.style.display='inline'; Codehighlighter1_1332_1556_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top></span><span style="COLOR: #000000">        </span><span id=Codehighlighter1_1332_1556_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1332_1556_Open_Text><span style="COLOR: #000000">{    <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">len,r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">>=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">)  <br><img id=Codehighlighter1_1380_1489_Open_Image onclick="this.style.display='none'; Codehighlighter1_1380_1489_Open_Text.style.display='none'; Codehighlighter1_1380_1489_Closed_Image.style.display='inline'; Codehighlighter1_1380_1489_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1380_1489_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1380_1489_Closed_Text.style.display='none'; Codehighlighter1_1380_1489_Open_Image.style.display='inline'; Codehighlighter1_1380_1489_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>                </span><span id=Codehighlighter1_1380_1489_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1380_1489_Open_Text><span style="COLOR: #000000">{            </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">闄ゆ硶浠庨珮浣嶅埌浣庝綅</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">                temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">r</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">b[j];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                b[j]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                r</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>                }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">!</span><span style="COLOR: #000000">b[len])        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">澶勭悊楂樹綅鐨勯浂浣?/span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">            len</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">len;j</span><span style="COLOR: #000000">>=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">b[j];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span></div> <img src ="http://www.shnenglu.com/Dreams/aggbug/81929.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Dreams/" target="_blank">DreamSky</a> 2009-05-05 12:53 <a href="http://www.shnenglu.com/Dreams/archive/2009/05/05/81929.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hdu 1023 Train Problem IIhttp://www.shnenglu.com/Dreams/archive/2009/05/05/81919.htmlDreamSkyDreamSkyTue, 05 May 2009 03:02:00 GMThttp://www.shnenglu.com/Dreams/archive/2009/05/05/81919.htmlhttp://www.shnenglu.com/Dreams/comments/81919.htmlhttp://www.shnenglu.com/Dreams/archive/2009/05/05/81919.html#Feedback0http://www.shnenglu.com/Dreams/comments/commentRss/81919.htmlhttp://www.shnenglu.com/Dreams/services/trackbacks/81919.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=1023
//C(0) = 1 ; (n+2)*C(n+1) = (4n+2)*C(n);
#include<iostream>
using namespace std;
int a[101][101]={0};
int main()
{
    
int n,i,j,len,r,temp,t;
    
int b[101];
    a[
1][0= 1;
    len 
= 1;
    b[
1= 1;
    
for(i=2;i<=100;i++)
    
{
        t 
= i-1;
        
for(j=0;j<len;j++//涔樻硶
            a[i][j] = a[i-1][j]*(4*t+2);
        
for(r=j=0;j<len;j++)  //澶勭悊鐩鎬箻緇撴灉
        {
            temp 
= a[i][j] + r;
            a[i][j] 
= temp % 10;
            r 
= temp / 10;
        }

        
while(r) //榪涗綅澶勭悊
        {
            a[i][len
++= r % 10;
            r 
/= 10;
        }


        
for(j=len-1,r=0;j>=0;j--//闄ゆ硶
        {
            temp 
= r*10 + a[i][j];
            a[i][j] 
= temp/(t+2);
            r 
= temp%(t+2);
        }

        
while(!a[i][len-1]) //楂樹綅闆跺鐞?/span>
            len --;
        b[i] 
= len;
    }

    
while(cin>>n)
    
{   
        
for(j=b[n]-1;j>=0;j--)
            printf(
"%d",a[n][j]);
        printf(
"\n");
    }

    
return 0;
}

/*
1: 1
2: 2
3: 5
4: 14
5: 42
6: 132
7: 429
8: 1430
9: 4862
10: 16796
11: 58786
12: 208012
13: 742900
14: 2674440
15: 9694845
16: 35357670
17: 129644790
18: 477638700
19: 1767263190
20: 6564120420
21: 24466267020
22: 91482563640
23: 343059613650
24: 1289904147324
25: 4861946401452
26: 18367353072152
27: 69533550916004
28: 263747951750360
29: 1002242216651368
30: 3814986502092304
31: 14544636039226909
32: 55534064877048198
33: 212336130412243110
34: 812944042149730764
35: 3116285494907301262
36: 11959798385860453492
37: 45950804324621742364
38: 176733862787006701400
39: 680425371729975800390
40: 2622127042276492108820
41: 10113918591637898134020
42: 39044429911904443959240
43: 150853479205085351660700
44: 583300119592996693088040
45: 2257117854077248073253720
46: 8740328711533173390046320
47: 33868773757191046886429490
48: 131327898242169365477991900
49: 509552245179617138054608572
50: 1978261657756160653623774456
51: 7684785670514316385230816156
52: 29869166945772625950142417512
53: 116157871455782434250553845880
54: 451959718027953471447609509424
55: 1759414616608818870992479875972
56: 6852456927844873497549658464312
57: 26700952856774851904245220912664
58: 104088460289122304033498318812080
59: 405944995127576985730643443367112
60: 1583850964596120042686772779038896
61: 6182127958584855650487080847216336
62: 24139737743045626825711458546273312
63: 94295850558771979787935384946380125
64: 368479169875816659479009042713546950
65: 1440418573150919668872489894243865350
66: 5632681584560312734993915705849145100
67: 22033725021956517463358552614056949950
68: 86218923998960285726185640663701108500
69: 337485502510215975556783793455058624700
70: 1321422108420282270489942177190229544600
71: 5175569924646105559418940193995065716350
72: 20276890389709399862928998568254641025700
73: 79463489365077377841208237632349268884500
74: 311496878311103321137536291518809134027240
75: 1221395654430378811828760722007962130791020
76: 4790408930363303911328386208394864461024520
77: 18793142726809884575211361279087545193250040
78: 73745243611532458459690151854647329239335600
79: 289450081175264899454283846029490767264392230
80: 1136359577947336271931632877004667456667613940
81: 4462290049988320482463241297506133183499654740
82: 17526585015616776834735140517915655636396234280
83: 68854441132780194707888052034668647142985206100
84: 270557451039395118028642463289168566420671280440
85: 1063353702922273835973036658043476458723103404520
86: 4180080073556524734514695828170907458428751314320
87: 16435314834665426797069144960762886143367590394940
88: 64633260585762914370496637486146181462681535261000
89: 254224158304000796523953440778841647086547372026600
90: 1000134600800354781929399250536541864362461089950800
91: 3935312233584004685417853572763349509774031680023800
92: 15487357822491889407128326963778343232013931127835600
93: 60960876535340415751462563580829648891969728907438000
94: 239993345518077005168915776623476723006280827488229600
95: 944973797977428207852605870454939596837230758234904050
96: 3721443204405954385563870541379246659709506697378694300
97: 14657929356129575437016877846657032761712954950899755100
98: 57743358069601357782187700608042856334020731624756611000
99: 227508830794229349661819540395688853956041682601541047340
100: 896519947090131496687170070074100632420837521538745909320
*/




DreamSky 2009-05-05 11:02 鍙戣〃璇勮
]]>
hdu 2669 Romantichttp://www.shnenglu.com/Dreams/archive/2009/05/04/81863.htmlDreamSkyDreamSkyMon, 04 May 2009 11:04:00 GMThttp://www.shnenglu.com/Dreams/archive/2009/05/04/81863.htmlhttp://www.shnenglu.com/Dreams/comments/81863.htmlhttp://www.shnenglu.com/Dreams/archive/2009/05/04/81863.html#Feedback0http://www.shnenglu.com/Dreams/comments/commentRss/81863.htmlhttp://www.shnenglu.com/Dreams/services/trackbacks/81863.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=2669
//嬈у嚑閲屽痙綆楁硶錛圗uclid錛?/span>
#include <iostream>
using namespace std;
int exgcd(int a, int b, int &x, int &y)//杈楄漿鐩擱櫎娉曟眰鏈澶у叕綰︽暟GCD
{
    
if(b == 0
    
{
        x 
= 1;
        y 
= 0;
        
return a;
    }

    
int r = exgcd(b, a % b, x, y);
    
int t = x;
    x 
= y;
    y 
= t - a / b * y;
    
return r;
}

int main()
{
    
int m,n,a,b,r;
    
while(scanf("%d%d",&a,&b)+1)
    
{
        r
=exgcd(a,b,m,n);
        
if(r==1)//鏈澶у叕綰︽暟涓?鏃?/span>
        {
            
while(m<0)
            
{
                m
+=b;
                n
-=a;
            }

            printf(
"%d %d\n",m,n);
        }

        
else printf("sorry\n");
    }

    
return 0;
}


DreamSky 2009-05-04 19:04 鍙戣〃璇勮
]]>
hdu 1134 Game of Connectionshttp://www.shnenglu.com/Dreams/archive/2009/04/30/81573.htmlDreamSkyDreamSkyThu, 30 Apr 2009 07:51:00 GMThttp://www.shnenglu.com/Dreams/archive/2009/04/30/81573.htmlhttp://www.shnenglu.com/Dreams/comments/81573.htmlhttp://www.shnenglu.com/Dreams/archive/2009/04/30/81573.html#Feedback0http://www.shnenglu.com/Dreams/comments/commentRss/81573.htmlhttp://www.shnenglu.com/Dreams/services/trackbacks/81573.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=1134
#include <iostream>
using namespace std;
#define SIZE 100
int main()
{
    
int a[101][SIZE]={0}//鏁扮粍鐢ㄦ潵瀛樻斁緇撴灉
    a[1][0]=1;            //鍒濆鍖栫涓欏?nbsp;           
    int i,j,r=0,temp=0,len=1;    //len 琛ㄧず褰撳墠鏈闀跨殑鏈夋晥浣嶆暟錛屽垵濮嬩負1
    for(i=2;i<=100;i++)          //浠庣浜岄」鍒扮100欏癸紝鐢ㄥ叕寮忚綆?/span>
    {
        
for(j=0;j<len;j++)   //---------------涔樻硶閮ㄥ垎------------------
        {
            a[i][j]
=a[i-1][j]*(4*i-2);    //涔樻硶浠庝綆浣嶅埌楂樹綅
        }

        
for(j=0;j<len;j++)        //瀵逛箻鍑虹殑緇撴灉榪涜澶勭悊錛屼笉鍖呮嫭鏈楂樹綅
        {
            temp
=a[i][j]+r;
            a[i][j]
=temp%10;
            r
=temp/10;
        }

        
while(r)            //瀵規渶楂樹綅榪涗綅澶勭悊
        {
            a[i][len]
=r%10;
            r
/=10;
            len
++;
        }
            
        
//-----------------闄ゆ硶閮ㄥ垎-----------------
        for(j=len-1,r=0;j>=0;j--)
        
{            //闄ゆ硶浠庨珮浣嶅埌浣庝綅
            temp=r*10+a[i][j];
            a[i][j]
=temp/(i+1);
            r
=temp%(i+1);
        }

        
while(!a[i][len-1])        //澶勭悊楂樹綅鐨勯浂浣?/span>
            len--;

    }
          
    
//-------------------------------------------
    int n;
    
while(cin>>n&&n!=-1)
    
{
        
for(i=SIZE-1;!a[n][i];i--);
        
for(i;i>=0;i--)
            cout
<<a[n][i];
        cout
<<endl;
    }

    
return 0;
}


DreamSky 2009-04-30 15:51 鍙戣〃璇勮
]]>
hdu 1133 Buy the Tickethttp://www.shnenglu.com/Dreams/archive/2009/04/30/81568.htmlDreamSkyDreamSkyThu, 30 Apr 2009 07:36:00 GMThttp://www.shnenglu.com/Dreams/archive/2009/04/30/81568.htmlhttp://www.shnenglu.com/Dreams/comments/81568.htmlhttp://www.shnenglu.com/Dreams/archive/2009/04/30/81568.html#Feedback0http://www.shnenglu.com/Dreams/comments/commentRss/81568.htmlhttp://www.shnenglu.com/Dreams/services/trackbacks/81568.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=1133
//1323739 2009-04-30 15:27:35 Accepted 1133 15MS 580K 1116 B C++ no way 
#include<iostream>
using namespace std;
int main()
{
    
int i,j,len=1,r=0,temp=0;
    
int a[201][400]={0};
    a[
1][0]=1;
    
for(i=2;i<=200;i++)//姹?……200鐨勯樁涔?/span>
    {
        
for(j=0;j<len;j++)
            a[i][j] 
= a[i-1][j] * i;
        
for(j=0,r=0;j<len;j++)
        
{
            temp 
= a[i][j] + r;
            a[i][j] 
= temp % 10;
            r 
= temp /10;
        }

        
while(r)
        
{
            a[i][len
++= r%10;
            r 
/= 10;
        }

    }

    
int m,n,cas=1;
    
while(cin>>m>>n)
    
{
        
if(m==0 && n==0)
            
break;
        cout
<<"Test #"<<cas++<<":"<<endl;
        
if(n>m)
        
{
            cout
<<0<<endl;
            
continue;
        }

        r 
= 0;
        len 
= 400;//鏀規垚300灝遍敊浜?/span>
        int b[500]={0};
        
for(j=0;j<len;j++)
        
{
            temp 
= a[m+n][j]*(m+1-n) + r;
            b[j] 
= temp % 10;
            r 
= temp /10;
        }

        
while(r)
        
{
            b[len
++= r%10;
            r 
/= 10;
        }


        
for(j=len-1,r=0;j>=0;j--)
        
{            //闄ゆ硶浠庨珮浣嶅埌浣庝綅
            temp=r*10+b[j];
            b[j]
=temp/(m+1);
            r
=temp%(m+1);
        }

        
while(!b[len])        //澶勭悊楂樹綅鐨勯浂浣?/span>
            len--;
        
for(j=len;j>=0;j--)
            cout
<<b[j];
        cout
<<endl;
    }

    
return 0;
}


DreamSky 2009-04-30 15:36 鍙戣〃璇勮
]]>
zju 1199 Point of Intersectionhttp://www.shnenglu.com/Dreams/archive/2009/04/02/78636.htmlDreamSkyDreamSkyThu, 02 Apr 2009 01:37:00 GMThttp://www.shnenglu.com/Dreams/archive/2009/04/02/78636.htmlhttp://www.shnenglu.com/Dreams/comments/78636.htmlhttp://www.shnenglu.com/Dreams/archive/2009/04/02/78636.html#Feedback0http://www.shnenglu.com/Dreams/comments/commentRss/78636.htmlhttp://www.shnenglu.com/Dreams/services/trackbacks/78636.htmlhttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=199

 

#include<iostream>
#include
<cmath>
using namespace std;
int main()
{
    
int t;
    cin
>>t;
    
while(t--)
    
{
        
double x1,y1,r1,x2,y2,r2,temp,drr,x0,y0;
        cin
>>x1>>y1>>r1;
        cin
>>x2>>y2>>r2;        
        
if(r1>r2)//r1濮嬬粓鏄皬鍦?/span>
        {
            temp
=r1; r1=r2; r2=temp;
            temp
=x1; x1=x2; x2=temp;
            temp
=y1; y1=y2; y2=temp;
        }

        drr
=sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
        
if(r2==r1)
        
{
            cout
<<"Impossible."<<endl;
            
continue;
        }

        
if(r1+drr<=r2)//鍐呭惈鎴栬呭唴鍒?/span>
        {
            cout
<<"Impossible."<<endl;
            
continue;
        }

        
if(x1==0 && x2==0)//涓ゅ渾蹇冨湪y杞翠笂
        {
            temp
=r1*drr/(r2-r1);
            
if(y1>y2)        
                printf(
"0.00 %.2lf\n",y1+temp);
            
else
                printf(
"0.00 %.2lf\n",y1-temp);
            
continue;
        }

        
if(y1==0 && y2==0)//涓ゅ渾蹇冨湪x杞翠笂
        {
            temp
=r1*drr/(r2-r1);
            
if(x1>x2)
                printf(
"%.2lf 0.00\n",x1+temp);
            
else
                printf(
"%.2lf 0.00\n",x1-temp);
            
continue;
        }

        
        x0
=(r2*x1-r1*x2)/(r2-r1);
        y0
=(y1-y2)*r1/(r2-r1)+y1;

        printf(
"%.2lf %.2lf\n",x0,y0);
    }

    
return 0;
}


DreamSky 2009-04-02 09:37 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            激情91久久| 亚洲福利国产精品| 久久久久久久999精品视频| 久久精品欧洲| 亚洲精品一区二区三区福利| 亚洲一区二三| 亚洲国产女人aaa毛片在线| 亚洲香蕉网站| 国产一区二区三区四区| 亚洲精品美女在线观看| 亚洲另类一区二区| 黄色成人在线观看| 亚洲视频在线看| 久久精品视频网| 国产精品黄视频| 欧美大片在线观看一区| 国产精品一区二区女厕厕| 欧美成人嫩草网站| 亚洲美女区一区| 久久综合狠狠综合久久综青草 | 欧美日韩精品综合| 另类av导航| 国产精品视频一二三| 亚洲人被黑人高潮完整版| 亚洲午夜精品久久| 欧美黑人多人双交| 蜜臀久久99精品久久久画质超高清| 国产精品一区二区三区四区| 久久综合伊人77777| 99这里只有精品| 日韩午夜av| 女同一区二区| 亚洲第一免费播放区| 精品999在线播放| 欧美日本国产精品| 亚洲美女尤物影院| 亚洲午夜精品一区二区三区他趣| 国产欧美精品xxxx另类| 欧美一级二级三级蜜桃| 久久久久久久999精品视频| 妖精成人www高清在线观看| 欧美日韩国产二区| 久久久久久久综合| 欧美激情精品久久久久久免费印度| 极品av少妇一区二区| 国产精品vip| 午夜精品久久久久影视| 久久精品一区中文字幕| 99综合电影在线视频| 伊人精品成人久久综合软件| 欧美成人官网二区| 一区二区av在线| 久久精品亚洲国产奇米99| 一区二区三区精品在线| 国产人成精品一区二区三| 欧美日韩国产精品成人| 蜜桃av一区二区三区| 99精品久久久| 亚洲黄网站在线观看| 亚洲一区欧美一区| 国产亚洲一二三区| 国产精品男女猛烈高潮激情| 欧美自拍偷拍| 亚洲欧洲一区二区在线播放| 欧美h视频在线| 亚洲一区二区在线看| 亚洲精品在线电影| 亚洲级视频在线观看免费1级| 精品白丝av| 影音先锋久久资源网| 韩国视频理论视频久久| 国模精品一区二区三区色天香| 欧美成人有码| 欧美大片一区| 欧美电影电视剧在线观看| 卡一卡二国产精品| 久久综合伊人77777蜜臀| 久久尤物电影视频在线观看| 久久人人97超碰精品888| 一区二区久久久久久| 亚洲精品无人区| 日韩一级免费| 亚洲一级片在线看| 亚洲欧美日产图| 久久er99精品| 久久夜色精品一区| 欧美成人精品一区二区三区| 欧美精品情趣视频| 久久免费高清视频| 蜜臀av在线播放一区二区三区 | 欧美激情精品久久久久久久变态| 你懂的国产精品| 欧美日韩卡一卡二| 老司机精品视频一区二区三区| 久久网站免费| 欧美日韩国产精品| 国产精品三区www17con| 国产一区二区三区久久久| 韩国av一区二区| 亚洲精品女人| 亚洲欧美激情诱惑| 一区二区三区久久| 午夜精品久久久久久久蜜桃app| 亚洲日韩成人| 亚洲永久在线| 久久亚洲精品一区| 久久亚洲欧美国产精品乐播| 欧美国产专区| 亚洲视频在线观看视频| 久久青青草综合| 欧美三级在线| 欧美三级在线视频| 国产一区二区三区在线观看免费 | 一区二区三区精品视频| 欧美在线地址| 欧美日韩国产综合久久| 国产一区二区三区视频在线观看 | 在线亚洲免费视频| 久久久www| 亚洲精品久久久蜜桃| 午夜亚洲精品| 性欧美精品高清| 欧美精品入口| 激情欧美一区| 亚洲一区黄色| 欧美激情在线有限公司| 亚洲免费在线视频| 欧美一区二区精品| 欧美人交a欧美精品| 国产伊人精品| 亚洲欧美日韩爽爽影院| 欧美国产日韩亚洲一区| 亚洲欧美日韩中文视频| 欧美激情在线观看| 一色屋精品视频在线观看网站| 一区二区三区日韩在线观看| 久久亚洲综合色| 亚洲一区二区三区777| 欧美成人免费网| 合欧美一区二区三区| 午夜精品久久久久久久男人的天堂 | 午夜国产精品影院在线观看| 欧美成人精品在线播放| 欧美亚洲专区| 国产精品免费看| 国产精品99久久久久久久女警| 亚洲一区激情| 亚洲人妖在线| 嫩模写真一区二区三区三州| 国内精品免费在线观看| 欧美一区二区高清在线观看| 久久九九精品99国产精品| 中文有码久久| 久久久久久网址| 国产午夜精品美女视频明星a级 | 久久久亚洲综合| 国产一区二区精品| 欧美一区二区三区免费大片| 一本色道久久99精品综合| 欧美日韩hd| 中国女人久久久| 亚洲日产国产精品| 欧美激情女人20p| 日韩亚洲一区二区| 亚洲精品视频在线| 欧美日本亚洲| 亚洲无限av看| 中文欧美日韩| 国产精品网曝门| 欧美一级日韩一级| 亚洲国产欧美不卡在线观看| 亚洲一区日本| 国产伦精品一区二区三区视频黑人 | 亚洲精品你懂的| 欧美日韩精品一区二区| 99精品国产99久久久久久福利| 亚洲国产另类久久精品| 欧美韩日一区| 中文日韩欧美| 亚洲综合视频在线| 国产亚洲一区二区三区在线播放| 久久免费视频网站| 亚洲天堂av电影| 国产精品私房写真福利视频| 久久精品中文字幕一区二区三区| 欧美中文在线观看国产| 精久久久久久| 亚洲激情视频在线| 欧美肉体xxxx裸体137大胆| 亚洲欧洲99久久| 久久国产一区二区| 国产精品hd| 久久精品亚洲一区二区| 久久久五月婷婷| 一区二区毛片| 午夜欧美精品| 亚洲理论在线观看| 亚洲影院免费| 亚洲国内精品在线| 日韩亚洲国产欧美|