锘??xml version="1.0" encoding="utf-8" standalone="yes"?>人妻精品久久久久中文字幕一冢本,久久高清一级毛片,久久99精品久久久久久久不卡 http://www.shnenglu.com/Yuan/category/16257.htmlzh-cnWed, 04 May 2011 21:05:47 GMTWed, 04 May 2011 21:05:47 GMT60CF54Chttp://www.shnenglu.com/Yuan/archive/2011/05/05/145704.html_Yuan_YuanWed, 04 May 2011 17:06:00 GMThttp://www.shnenglu.com/Yuan/archive/2011/05/05/145704.htmlhttp://www.shnenglu.com/Yuan/comments/145704.htmlhttp://www.shnenglu.com/Yuan/archive/2011/05/05/145704.html#Feedback0http://www.shnenglu.com/Yuan/comments/commentRss/145704.htmlhttp://www.shnenglu.com/Yuan/services/trackbacks/145704.html/*
    鍖洪棿[L,R]涓瘡涓暟鍑虹幇鐨勬鐜囦負1/(R-L+1)
    鐜扮粰鍑簄涓尯闂達紝[Li,Ri]錛屾瘡涓尯闂存娊鍙栧嚭涓涓暟
    姹傝繖n涓暟涓紝鑷沖皯鏈塊%涓暟鐨勫墠緙涓?鐨勬鐜?br>
    鍙互澶勭悊鍑烘瘡涓尯闂碵Li, Ri]鎶藉彇鐨勬暟鍓嶇紑涓?鐨勬鐜噋[i]
    dp[i,j]琛ㄧず鍓嶉潰i涓尯闂存湁j涓暟鍓嶇紑涓?鐨勬鐜?br>    鍒欒漿縐誨氨鏄痙p[i,j] = dp[i-1,j-1]*p[i]  + dp[i-1,j]*(1-p[i])
    絳旀灝辨槸鈭慸p[n,j]錛?nbsp;j/n >= K%
*/

#include
<iostream>
#include
<cstring>
#include
<map>
#include
<algorithm>
#include
<stack>
#include
<queue>
#include
<cmath>
#include
<string>
#include
<cstdlib>
#include
<vector>
#include
<cstdio>
#include
<set>
#include
<list>
#include
<numeric>
#include
<cassert>
#include
<ctime>
#include
<bitset>

using namespace std;

long long cal(long long x) {//[1,x]
    long long cnt = 0 , now = 1;
    
while(x/now > 1{
        cnt 
+= now;
        now 
*= 10;
    }

    
if(x / now == 1{//x = 1***
        cnt += x - now + 1;
    }

    
return cnt;
}


double cal(long long left, long long right) {
    
return (cal(right) - cal(left-1)) / (right - left + 1.0);
}


double p[1000], dp[1000][1000];

int main()
{
#ifndef ONLINE_JUDGE
    freopen(
"in","r",stdin);
#endif    

    
for (int n; ~scanf("%d"&n); ) {
        
long long left, right;
        
for (int i = 0; i <n ; i++{
            scanf(
"%I64d%I64d"&left, &right);
            p[i] 
= cal(left, right);
        }

        memset(dp, 
0sizeof dp);
        dp[
0][0= 1.0;
        
for (int i = 1; i <= n; i++{
            
for(int j = 0; j <= i; j++{
                dp[i][j] 
= dp[i-1][j-1]*p[i-1+ dp[i-1][j]*(1-p[i-1]);
            }

        }

        
int per;
        scanf(
"%d"&per);
        
double ans = 0;
        
forint j = 0 ; j <= n; j++ ) {
            
if(100*>= n*per) {
                ans 
+= dp[n][j];
            }

        }

        printf(
"%.10f\n", ans);
    }

    
return 0;
}


_Yuan 2011-05-05 01:06 鍙戣〃璇勮
]]>
鍏腑 1833 zjoi 2010 counthttp://www.shnenglu.com/Yuan/archive/2011/03/23/142568.html_Yuan_YuanWed, 23 Mar 2011 05:32:00 GMThttp://www.shnenglu.com/Yuan/archive/2011/03/23/142568.htmlhttp://www.shnenglu.com/Yuan/comments/142568.htmlhttp://www.shnenglu.com/Yuan/archive/2011/03/23/142568.html#Feedback0http://www.shnenglu.com/Yuan/comments/commentRss/142568.htmlhttp://www.shnenglu.com/Yuan/services/trackbacks/142568.html/*
    姹俒a,b]涓?-9鍚勬暟瀛楀嚭鐜扮殑嬈℃暟    <=10^12

    涓寮濮嬫垜鐢ㄦ暟浣嶇粺璁℃悶
    鎯蟲寜鐓ц繖縐嶆柟娉曟悶鐨?br>    
http://www.shnenglu.com/Yuan/archive/2011/01/25/139299.html
    鎼炰簡濂戒箙鎼炰笉鍑猴紝閫愭笎鍙戠幇dfs鍨嬬殑鍐欐硶錛岀姸鎬佷竴鑸渶瑕?pos,pre)錛岄渶瑕佸帇緙╁墠緙涓簆re
    鎴戝畾涔?pos, preCnt)
    preCnt鏄〃紺哄墠緙涓湁澶氬皯涓暟瀛楄窡褰撳墠瑕佹鏌ョ殑鏁板瓧鐩稿悓錛屼笉琛岀殑錛屼笉鑳芥紜〃紺哄嚭鍓嶇紑!
    濡?2,21璁板綍1鍑虹幇鐨勪釜鏁伴兘鏄竴鏍風殑錛屼絾鏄粨鏋滀笉鍚?br>    浼氳if(dp[pos][pre] != -1)
        return dp[pos][pre]
    榪斿洖閿欒鐨勭粨鏋?br>
    榪欎釜鍓嶇紑搴旇鍏鋒湁鍏辯敤鎬э紝涔熷氨璇翠笉鍚屽墠緙鍘嬬緝寰楀埌鐨勭粨鏋滄湁浜涜涓鏍鳳紝榪欐牱鎵嶈兘璁板繂鍖栧槢錛岄噸澶嶅埄鐢紒錛?br>    浣嗚繖棰橈紝鍓嶇紑濡傛灉鏄洿鎺ョ敤鍓嶉潰鐨勬暟瀛楁潵琛ㄧず鐨勮瘽錛屽緢澶氾紝鑲畾鏃剁┖閮戒笉琛?br>    
    
    鎵浠ワ紝鎼炴暟浣嶇粺璁★紝闇瑕佽褰曞墠緙錛堟暟浣嶇粺璁′笉璁板綍搴旇鍓嶇紑涓嶈鍚э級
    鍚屾椂鍓嶇紑蹇呴』鏄兘鍖哄垎錛堜笉浼氳繑鍥為敊璇粨鏋滐級鐨勶紝榪樿鍙叡鐢紙鐢ㄦ潵鍑忓皯榪愮畻錛屾彁楂橀熷害錛?br>    
    榪欓亾棰樼殑姝g‘鍋氭硶錛屾崲鍋氫互鍓嶏紝鍙兘浼氭兂鍒幫紝浣嗘槸鐜板湪鎰熻鎬濈淮瀹氬娍浜員_T
    鍙傝僪ttp://hi.baidu.com/736551725/blog/item/8ba4408e4fb74206b21bbae4.html
    瑙傚療涓嬭〃
    000
    001
    .
    998
    999
    瀵逛簬闀垮害涓?鐨勶紝鎬誨叡鏈?*10^3涓暟瀛楋紝姣忎釜鏁板瓧鍑虹幇鐨勬鐜囦竴鏍鳳紝鎵浠ユ瘡涓暟瀛楀嚭鐜扮殑嬈℃暟涓?*10^3/10
    涔熷嵆瀹藉害涓簄鐨勮〃錛屾瘡涓暟瀛楀嚭鐜扮殑嬈℃暟涓簄*10^(n-1)
    瀵逛簬鍓嶇紑0錛岃鍘繪帀錛屽浜庡搴︿負n鐨勮〃錛屽墠緙0鐨勪釜鏁頒負11..1涓紙琛ㄧ殑宸︿笂瑙掗偅浜?錛屽寘鎷?00閭d釜錛?br>
    鏈変簡涓婇潰鐨勮瀵燂紝灝遍愪綅緇熻涓嬶紝灝辮兘寰楀埌[1,n]鍚勪釜鏁板瓧鍑虹幇鐨勬鏁頒簡
*/

#include
<iostream>
#include
<cstring>
#include
<map>
#include
<algorithm>
#include
<stack>
#include
<queue>
#include
<cmath>
#include
<string>
#include
<cstdlib>
#include
<vector>
#include
<cstdio>
#include
<set>
#include
<list>
#include
<numeric>
#include
<cassert>
#include
<ctime>

using namespace std;

void gao(__int64 n,  __int64 cnt[]){//count all digits in [1,n] , not [0,n]
    /*
    check a form like this .
        000
        001
        .
        010
        .
        099
        100
        101   ------N
    
*/

    
int digit[20], num = 0;
    __int64 p 
= 1, N = n, sub = 0;
    
do{
        digit[num
++= n % 10;
        n 
/= 10;
        p 
*= 10;
    }
while(n > 0);
    
for(int i = num - 1,j ; i >= 0 ; i --){
        p 
/= 10;
        
for(j = 0 ; j < digit[i] ; j++){
            cnt[j] 
+= p;
            
for(int k = 0; k < 10 ; k++){
                cnt[k] 
+= p/10*i;
            }

        }

        N 
%= p;
        cnt[j] 
+= N+1;//瑕佸姞1
        sub += p;
    }

    cnt[
0-= sub;
}


int main()
{
#ifndef ONLINE_JUDGE
    freopen(
"in","r",stdin);
#endif

    
for(__int64 left, right ; cin >> left >> right; ){
        __int64 cnt[
10= {0};
        gao(left
-1, cnt);
        
for(int i = 0 ; i < 10 ; i++){
            cnt[i] 
= -cnt[i];
        }

        gao(right, cnt);
        
for(int i = 0; i < 10 ; i++){
            
if(i){
                putchar(
' ');
            }

            printf(
"%I64d", cnt[i]);
        }

        puts(
"");
    }

    
return 0;
}


_Yuan 2011-03-23 13:32 鍙戣〃璇勮
]]>
hdu 3398 榪涙爤鍑烘爤璁℃暟 n!璐ㄥ洜瀛愬垎瑙?/title><link>http://www.shnenglu.com/Yuan/archive/2011/03/22/142478.html</link><dc:creator>_Yuan</dc:creator><author>_Yuan</author><pubDate>Tue, 22 Mar 2011 07:02:00 GMT</pubDate><guid>http://www.shnenglu.com/Yuan/archive/2011/03/22/142478.html</guid><wfw:comment>http://www.shnenglu.com/Yuan/comments/142478.html</wfw:comment><comments>http://www.shnenglu.com/Yuan/archive/2011/03/22/142478.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Yuan/comments/commentRss/142478.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/Yuan/services/trackbacks/142478.html</trackback:ping><description><![CDATA[<div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px"><img id=Codehighlighter1_0_521_Open_Image onclick="this.style.display='none'; Codehighlighter1_0_521_Open_Text.style.display='none'; Codehighlighter1_0_521_Closed_Image.style.display='inline'; Codehighlighter1_0_521_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_0_521_Closed_Image onclick="this.style.display='none'; Codehighlighter1_0_521_Closed_Text.style.display='none'; Codehighlighter1_0_521_Open_Image.style.display='inline'; Codehighlighter1_0_521_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_0_521_Closed_Text>/**/</span><span id=Codehighlighter1_0_521_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    緇欏嚭n涓?錛宮涓?錛岀粍鎴愪竴涓覆錛岃姹傝繖涓覆鐨勪換鎰忓墠緙閮芥湁1鐨勪釜鏁?gt;=0鐨勪釜鏁?br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    姹傛弧瓚寵繖鏍風殑涓茬殑涓暟<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    n,m <= 10^6<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    鑴戞畫涓紝寰堟槑鏄劇殑“榪涙爤鍑烘爤”錛屽眳鐒舵病鍙嶅簲<img src="http://www.shnenglu.com/Images/dot.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    璁℃暟鍏紡涓?br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        (n+m, m) - (n+m, m-1)<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">            (n+m)!(n-m+1)<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    =    ------------------<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">           (n+1)!m!<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    O(n)鐨勮綆椾細瓚呮椂錛岃瀵筃!鍒嗚В璐ㄥ洜瀛?br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    鐢ㄥ埌鍏紡N!閲岃川鍥犲瓙p鐨勪釜鏁頒負 N/p + N/p^2 + <img src="http://www.shnenglu.com/Images/dot.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    榪欒娉ㄦ剰鍒繕璁板(n-m+1)鍒嗚В璐ㄥ洜瀛愪簡錛屽鏋滄斁鍦ㄦ渶鍚庢潵涔樺畠鐨勮瘽錛屾湁鍙兘瀵規(guī)煇涓川鍥犲瓙p錛屽彧鐢ㄩ偅涓変釜綆楀埌鐨?br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    騫傚皬浜?錛岃?0100501鍙堜笉鏄礌鏁幫紝灝遍毦綆?nbsp;p^x % 20100501  , x < 0<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    鍥犱負嬈ф媺瀹氱悊 a^x % n = a ^(x % phi(n) ) % n 闇瑕?nbsp;(a,n) = 1錛侊紒錛侊紒<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    鍏腑 1856璺熻繖棰樹竴鏍鳳紝涓嶈繃閭i噷鐨?0100403鏄礌鏁幫紝鍙互閭f牱鎼?nbsp;p^x<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    鍙傝?nbsp;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #008000; TEXT-DECORATION: underline">http://hi.baidu.com/matrush/blog/item/5298d8a3786b478546106447.html</span><span style="COLOR: #008000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"></span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">cstring</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">map</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">algorithm</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stack</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">queue</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">cmath</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">cstdlib</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">vector</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">cstdio</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #0000ff">set</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">list</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">numeric</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">cassert</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">ctime</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></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 align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> MOD </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">20100501</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> MAXN </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">2000000</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> isPrime[MAXN</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">];<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> pr[MAXN] , tot;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img id=Codehighlighter1_924_1084_Open_Image onclick="this.style.display='none'; Codehighlighter1_924_1084_Open_Text.style.display='none'; Codehighlighter1_924_1084_Closed_Image.style.display='inline'; Codehighlighter1_924_1084_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_924_1084_Closed_Image onclick="this.style.display='none'; Codehighlighter1_924_1084_Closed_Text.style.display='none'; Codehighlighter1_924_1084_Open_Image.style.display='inline'; Codehighlighter1_924_1084_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> init()</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_924_1084_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_924_1084_Open_Text><span style="COLOR: #000000">{<br><img id=Codehighlighter1_963_1082_Open_Image onclick="this.style.display='none'; Codehighlighter1_963_1082_Open_Text.style.display='none'; Codehighlighter1_963_1082_Closed_Image.style.display='inline'; Codehighlighter1_963_1082_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_963_1082_Closed_Image onclick="this.style.display='none'; Codehighlighter1_963_1082_Closed_Text.style.display='none'; Codehighlighter1_963_1082_Open_Image.style.display='inline'; Codehighlighter1_963_1082_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(__int64 p </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">2</span><span style="COLOR: #000000"> ; p </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000"> MAXN ; p </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_963_1082_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_963_1082_Open_Text><span style="COLOR: #000000">{<br><img id=Codehighlighter1_982_1079_Open_Image onclick="this.style.display='none'; Codehighlighter1_982_1079_Open_Text.style.display='none'; Codehighlighter1_982_1079_Closed_Image.style.display='inline'; Codehighlighter1_982_1079_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_982_1079_Closed_Image onclick="this.style.display='none'; Codehighlighter1_982_1079_Closed_Text.style.display='none'; Codehighlighter1_982_1079_Open_Image.style.display='inline'; Codehighlighter1_982_1079_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">!</span><span style="COLOR: #000000">isPrime[p])</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_982_1079_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_982_1079_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">            pr[tot</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> p;<br><img id=Codehighlighter1_1047_1075_Open_Image onclick="this.style.display='none'; Codehighlighter1_1047_1075_Open_Text.style.display='none'; Codehighlighter1_1047_1075_Closed_Image.style.display='inline'; Codehighlighter1_1047_1075_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1047_1075_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1047_1075_Closed_Text.style.display='none'; Codehighlighter1_1047_1075_Open_Image.style.display='inline'; Codehighlighter1_1047_1075_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(__int64 j </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> p </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> p ; j </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000"> MAXN ; j </span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000"> p)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1047_1075_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1047_1075_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">                isPrime[j] </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">            }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">        }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img id=Codehighlighter1_1087_1127_Open_Image onclick="this.style.display='none'; Codehighlighter1_1087_1127_Open_Text.style.display='none'; Codehighlighter1_1087_1127_Closed_Image.style.display='inline'; Codehighlighter1_1087_1127_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1087_1127_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1087_1127_Closed_Text.style.display='none'; Codehighlighter1_1087_1127_Open_Image.style.display='inline'; Codehighlighter1_1087_1127_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1087_1127_Closed_Text>/**/</span><span id=Codehighlighter1_1087_1127_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    1*2*<img src="http://www.shnenglu.com/Images/dot.gif">*n<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    tot = n/p , n/p^2 , <img src="http://www.shnenglu.com/Images/dot.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"></span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img id=Codehighlighter1_1150_1223_Open_Image onclick="this.style.display='none'; Codehighlighter1_1150_1223_Open_Text.style.display='none'; Codehighlighter1_1150_1223_Closed_Image.style.display='inline'; Codehighlighter1_1150_1223_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1150_1223_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1150_1223_Closed_Text.style.display='none'; Codehighlighter1_1150_1223_Open_Image.style.display='inline'; Codehighlighter1_1150_1223_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> p, </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1150_1223_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1150_1223_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> tot </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_1179_1208_Open_Image onclick="this.style.display='none'; Codehighlighter1_1179_1208_Open_Text.style.display='none'; Codehighlighter1_1179_1208_Closed_Image.style.display='inline'; Codehighlighter1_1179_1208_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1179_1208_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1179_1208_Closed_Text.style.display='none'; Codehighlighter1_1179_1208_Open_Image.style.display='inline'; Codehighlighter1_1179_1208_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(n </span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1179_1208_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1179_1208_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        tot </span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000"> n </span><span style="COLOR: #000000">/</span><span style="COLOR: #000000"> p;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        n </span><span style="COLOR: #000000">/=</span><span style="COLOR: #000000"> p;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> tot;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img id=Codehighlighter1_1250_1426_Open_Image onclick="this.style.display='none'; Codehighlighter1_1250_1426_Open_Text.style.display='none'; Codehighlighter1_1250_1426_Closed_Image.style.display='inline'; Codehighlighter1_1250_1426_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1250_1426_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1250_1426_Closed_Text.style.display='none'; Codehighlighter1_1250_1426_Open_Image.style.display='inline'; Codehighlighter1_1250_1426_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> ipow(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> a , </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1250_1426_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1250_1426_Open_Text><span style="COLOR: #000000">{<br><img id=Codehighlighter1_1267_1282_Open_Image onclick="this.style.display='none'; Codehighlighter1_1267_1282_Open_Text.style.display='none'; Codehighlighter1_1267_1282_Closed_Image.style.display='inline'; Codehighlighter1_1267_1282_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1267_1282_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1267_1282_Closed_Text.style.display='none'; Codehighlighter1_1267_1282_Open_Image.style.display='inline'; Codehighlighter1_1267_1282_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000"> ( n </span><span style="COLOR: #000000">==</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000"> ) </span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1267_1282_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1267_1282_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img id=Codehighlighter1_1297_1318_Open_Image onclick="this.style.display='none'; Codehighlighter1_1297_1318_Open_Text.style.display='none'; Codehighlighter1_1297_1318_Closed_Image.style.display='inline'; Codehighlighter1_1297_1318_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1297_1318_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1297_1318_Closed_Text.style.display='none'; Codehighlighter1_1297_1318_Open_Image.style.display='inline'; Codehighlighter1_1297_1318_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000"> (n </span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ) </span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1297_1318_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1297_1318_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> a </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> MOD;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    __int64 ans </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ipow(a, n</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">);<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    ans </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ans </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> ans </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> MOD;<br><img id=Codehighlighter1_1385_1411_Open_Image onclick="this.style.display='none'; Codehighlighter1_1385_1411_Open_Text.style.display='none'; Codehighlighter1_1385_1411_Closed_Image.style.display='inline'; Codehighlighter1_1385_1411_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1385_1411_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1385_1411_Closed_Text.style.display='none'; Codehighlighter1_1385_1411_Open_Image.style.display='inline'; Codehighlighter1_1385_1411_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000"> ( n</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000"> ) </span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1385_1411_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1385_1411_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        ans </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ans </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> a </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> MOD;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> ans;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img id=Codehighlighter1_1452_1808_Open_Image onclick="this.style.display='none'; Codehighlighter1_1452_1808_Open_Text.style.display='none'; Codehighlighter1_1452_1808_Closed_Image.style.display='inline'; Codehighlighter1_1452_1808_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1452_1808_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1452_1808_Closed_Text.style.display='none'; Codehighlighter1_1452_1808_Open_Image.style.display='inline'; Codehighlighter1_1452_1808_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> solve(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n, </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> m)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1452_1808_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1452_1808_Open_Text><span style="COLOR: #000000">{<br><img id=Codehighlighter1_1464_1479_Open_Image onclick="this.style.display='none'; Codehighlighter1_1464_1479_Open_Text.style.display='none'; Codehighlighter1_1464_1479_Closed_Image.style.display='inline'; Codehighlighter1_1464_1479_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1464_1479_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1464_1479_Closed_Text.style.display='none'; Codehighlighter1_1464_1479_Open_Image.style.display='inline'; Codehighlighter1_1464_1479_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(n </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000"> m)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1464_1479_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1464_1479_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img id=Codehighlighter1_1482_1539_Open_Image onclick="this.style.display='none'; Codehighlighter1_1482_1539_Open_Text.style.display='none'; Codehighlighter1_1482_1539_Closed_Image.style.display='inline'; Codehighlighter1_1482_1539_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1482_1539_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1482_1539_Closed_Text.style.display='none'; Codehighlighter1_1482_1539_Open_Image.style.display='inline'; Codehighlighter1_1482_1539_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1482_1539_Closed_Text>/**/</span><span id=Codehighlighter1_1482_1539_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        (n+m)!(n-m+1)<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        ------------------<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">            m!(n+1)!<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    </span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    __int64 ans </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> nm </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> n </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> m </span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br><img id=Codehighlighter1_1629_1793_Open_Image onclick="this.style.display='none'; Codehighlighter1_1629_1793_Open_Text.style.display='none'; Codehighlighter1_1629_1793_Closed_Image.style.display='inline'; Codehighlighter1_1629_1793_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1629_1793_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1629_1793_Closed_Text.style.display='none'; Codehighlighter1_1629_1793_Open_Image.style.display='inline'; Codehighlighter1_1629_1793_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </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"><</span><span style="COLOR: #000000"> tot </span><span style="COLOR: #000000">&&</span><span style="COLOR: #000000"> pr[i] </span><span style="COLOR: #000000"><=</span><span style="COLOR: #000000"> (n</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">m) ; i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1629_1793_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1629_1793_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> cnt </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_1670_1700_Open_Image onclick="this.style.display='none'; Codehighlighter1_1670_1700_Open_Text.style.display='none'; Codehighlighter1_1670_1700_Closed_Image.style.display='inline'; Codehighlighter1_1670_1700_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1670_1700_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1670_1700_Closed_Text.style.display='none'; Codehighlighter1_1670_1700_Open_Image.style.display='inline'; Codehighlighter1_1670_1700_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(nm </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> pr[i] </span><span style="COLOR: #000000">==</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)</span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1670_1700_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1670_1700_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">            nm </span><span style="COLOR: #000000">/=</span><span style="COLOR: #000000"> pr[i];<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">            cnt</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">        }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        ans </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ans </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> ipow(pr[i], </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">(pr[i], n</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">m) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">(pr[i], m) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">(pr[i], n</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"> cnt) </span><span style="COLOR: #000000">%</span><span style="COLOR: #000000"> MOD;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> ans;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_1823_2014_Open_Image onclick="this.style.display='none'; Codehighlighter1_1823_2014_Open_Text.style.display='none'; Codehighlighter1_1823_2014_Closed_Image.style.display='inline'; Codehighlighter1_1823_2014_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1823_2014_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1823_2014_Closed_Text.style.display='none'; Codehighlighter1_1823_2014_Open_Image.style.display='inline'; Codehighlighter1_1823_2014_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1823_2014_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1823_2014_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">#ifndef ONLINE_JUDGE<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">freopen("in","r",stdin);</span><span style="COLOR: #008000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"></span><span style="COLOR: #0000ff">#endif</span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    init();<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> T;<br><img id=Codehighlighter1_1928_2001_Open_Image onclick="this.style.display='none'; Codehighlighter1_1928_2001_Open_Text.style.display='none'; Codehighlighter1_1928_2001_Closed_Image.style.display='inline'; Codehighlighter1_1928_2001_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_1928_2001_Closed_Image onclick="this.style.display='none'; Codehighlighter1_1928_2001_Closed_Text.style.display='none'; Codehighlighter1_1928_2001_Open_Image.style.display='inline'; Codehighlighter1_1928_2001_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000"> (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">&</span><span style="COLOR: #000000">T); T</span><span style="COLOR: #000000">--</span><span style="COLOR: #000000"> ; ) </span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_1928_2001_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_1928_2001_Open_Text><span style="COLOR: #000000">{    <br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n, m; <br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        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">&</span><span style="COLOR: #000000">n, </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m);<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">        printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, solve(n,m));<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">    }</span></span><span style="COLOR: #000000"><br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span></div> <img src ="http://www.shnenglu.com/Yuan/aggbug/142478.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Yuan/" target="_blank">_Yuan</a> 2011-03-22 15:02 <a href="http://www.shnenglu.com/Yuan/archive/2011/03/22/142478.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.mingxiao123.cn" target="_blank">午夜福利91久久福利</a>| <a href="http://www.bbcjk.cn" target="_blank">国产精品久久久久久久午夜片 </a>| <a href="http://www.shqidao.cn" target="_blank">久久综合亚洲色HEZYO社区</a>| <a href="http://www.s9459.cn" target="_blank">国内高清久久久久久</a>| <a href="http://www.jsbcly.cn" target="_blank">.精品久久久麻豆国产精品</a>| <a href="http://www.mayingbao.cn" target="_blank">国产精品综合久久第一页</a>| <a href="http://www.n-hao.cn" target="_blank">一本色道久久综合狠狠躁</a>| <a href="http://www.dgwbcc.cn" target="_blank">a级毛片无码兔费真人久久</a>| <a href="http://www.17youshi.cn" target="_blank">成人久久免费网站</a>| <a href="http://www.vbnj.cn" target="_blank">久久91这里精品国产2020</a>| <a href="http://www.zynsbank.cn" target="_blank">亚洲成色WWW久久网站</a>| <a href="http://www.fjqcbks.cn" target="_blank">久久久久人妻一区精品果冻</a>| <a href="http://www.h5982.cn" target="_blank">无码超乳爆乳中文字幕久久 </a>| <a href="http://www.ccco.org.cn" target="_blank">国产精品视频久久</a>| <a href="http://www.shouyoujie.cn" target="_blank">欧美久久久久久</a>| <a href="http://www.myjhy.cn" target="_blank">久久久久久国产精品免费免费</a>| <a href="http://www.gta567.cn" target="_blank">久久久久亚洲AV无码专区体验</a>| <a href="http://www.xin-qi.com.cn" target="_blank">一级a性色生活片久久无</a>| <a href="http://www.game839.cn" target="_blank">国产亚州精品女人久久久久久</a>| <a href="http://www.jsjdzz.cn" target="_blank">精品久久久久久无码专区</a>| <a href="http://www.mens-uno.com.cn" target="_blank">亚洲精品高清一二区久久</a>| <a href="http://www.hbrsksy.cn" target="_blank">99久久精品久久久久久清纯</a>| <a href="http://www.qcqxzx.cn" target="_blank">久久久国产精品亚洲一区</a>| <a href="http://www.fundmm.cn" target="_blank">欧美日韩精品久久免费</a>| <a href="http://www.lpnppddrppp.cn" target="_blank">久久精品视屏</a>| <a href="http://www.jiyiabc.cn" target="_blank">久久久久久久亚洲精品</a>| <a href="http://www.52888666.cn" target="_blank">久久本道综合久久伊人</a>| <a href="http://www.taotaoduoduo.cn" target="_blank">国产高潮国产高潮久久久91</a>| <a href="http://www.hwumbrella.cn" target="_blank"> 久久综合狠狠综合久久激情 </a>| <a href="http://www.cnbjwm.com.cn" target="_blank">欧美一区二区三区久久综合</a>| <a href="http://www.ha9hpn.cn" target="_blank">一本一本久久aa综合精品</a>| <a href="http://www.aylzys.cn" target="_blank">欧美亚洲国产精品久久</a>| <a href="http://www.gkno.cn" target="_blank">久久无码国产专区精品</a>| <a href="http://www.gcxv.cn" target="_blank">99久久夜色精品国产网站</a>| <a href="http://www.egpk.cn" target="_blank">无码久久精品国产亚洲Av影片</a>| <a href="http://www.enjoa.cn" target="_blank">午夜欧美精品久久久久久久</a>| <a href="http://www.kmaxbm.cn" target="_blank">麻豆一区二区99久久久久</a>| <a href="http://www.xahjqc.cn" target="_blank">久久精品国产亚洲AV麻豆网站</a>| <a href="http://www.angcha.cn" target="_blank">国产精品无码久久久久久</a>| <a href="http://www.6654sf.cn" target="_blank">色综合久久中文综合网</a>| <a href="http://www.chaohu8.cn" target="_blank">777久久精品一区二区三区无码</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>