锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国语自产精品视频在线看一大j8,在线视频国产日韩,亚洲理论电影网http://m.shnenglu.com/sdz/zh-cnWed, 24 Sep 2025 10:27:58 GMTWed, 24 Sep 2025 10:27:58 GMT60poj 1797 Heavy Transportation 鏈鐭礬http://m.shnenglu.com/sdz/archive/2010/09/01/125487.html鑻ヤ綑鑻ヤ綑Wed, 01 Sep 2010 01:28:00 GMThttp://m.shnenglu.com/sdz/archive/2010/09/01/125487.htmlhttp://m.shnenglu.com/sdz/comments/125487.htmlhttp://m.shnenglu.com/sdz/archive/2010/09/01/125487.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/125487.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/125487.htmlHeavy Transportation
Time Limit: 3000MS Memory Limit: 30000K
Total Submissions: 5123 Accepted: 1393

Description

Background
Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has build his giant steel crane to the place where it is needed on which all streets can carry the weight.
Fortunately he already has a plan of the city with all streets and bridges and all the allowed weights.Unfortunately he has no idea how to find the the maximum weight capacity in order to tell his customer how heavy the crane may become. But you surely know.

Problem
You are given the plan of the city, described by the streets (with weight limits) between the crossings, which are numbered from 1 to n. Your task is to find the maximum weight that can be transported from crossing 1 (Hugo's place) to crossing n (the customer's place). You may assume that there is at least one path. All streets can be travelled in both directions.

Input

The first line contains the number of scenarios (city plans). For each city the number n of street crossings (1 <= n <= 1000) and number m of streets are given on the first line. The following m lines contain triples of integers specifying start and end crossing of the street and the maximum allowed weight, which is positive and not larger than 1000000. There will be at most one street between each pair of crossings.

Output

The output for every scenario begins with a line containing "Scenario #i:", where i is the number of the scenario starting at 1. Then print a single line containing the maximum allowed weight that Hugo can transport to the customer. Terminate the output for the scenario with a blank line.

Sample Input

1
3 3
1 2 3
1 3 4
2 3 5

Sample Output

Scenario #1:
4
緇欏畾n涓偣錛屽強m鏉¤竟鐨勬渶澶ц礋杞斤紝姹傞《鐐?鍒伴《鐐筺鐨勬渶澶ф祦銆?/pre>
鐢―ijkstra綆楁硶瑙d箣錛屽彧鏄渶瑕佹妸“鏈鐭礬”鐨勫畾涔夌◢寰敼鍙樹竴涓嬶紝
A鍒癇鐨勮礬闀垮畾涔変負璺緞涓婅竟鏉冩渶灝忕殑閭f潯杈圭殑闀垮害錛?/pre>
鑰屾渶鐭礬鍏跺疄鏄疉鍒癇鎵鏈夎礬闀跨殑鏈澶у箋?/pre>
//Heavy Transportation
//Dijkstra
#include <iostream>
#include
<stdio.h>
using namespace std;
const int MAXS=1005;
int n;
int mat[MAXS][MAXS];
int asd[MAXS];
int s[MAXS];
int min(int a,int b){return a<b?a:b;}
int Dijkstra()
{
    
int i,j;
    
for(i=1;i<n;i++)
    
{
        asd[i]
=mat[0][i];
        s[i]
=0;
    }

    s[
0]=1;
    asd[
0]=0;
    
for(i=0;i<n-1;i++)
    
{
        
int max=0;
        
int u=0;
        
for(j=1;j<n;j++)
        
{
            
if(s[j]==0 && asd[j]>max)
            
{
                u
=j;
                max
=asd[j];
            }

        }

        
if(u==0)
            
break;
        s[u]
=1;
        asd[u]
=max;
        
for(j=1;j<n;j++)
        
{
            
if (s[j]==0 && asd[j]<min(asd[u],mat[u][j]))
            
{
                asd[j]
=min(asd[u],mat[u][j]);
                
            }

        }

    }

    
return asd[n-1];

}

int main()
{
    
    
int t,m;
    
int i,j;
    scanf(
"%d",&t);
    
int v1,v2;
    
int value;
    
for (int s=1;s<=t;s++)
    
{
        scanf(
"%d%d",&n,&m);
        
for(i=0;i<n;i++)
            
for (j=0;j<n;j++)
            
{
                mat[i][j]
=0;
            }

        
while (m--)
        
{
            scanf(
"%d%d%d",&v1,&v2,&value);
            mat[v1
-1][v2-1]=mat[v2-1][v1-1]=value;
            
        }

        printf(
"Scenario #%d:\n%d\n\n",s,Dijkstra());

    }

    
return 0;
}



鑻ヤ綑 2010-09-01 09:28 鍙戣〃璇勮
]]>poj 3734 Blocks 鐢熸垚鍑芥暟http://m.shnenglu.com/sdz/archive/2010/08/31/125347.html鑻ヤ綑鑻ヤ綑Tue, 31 Aug 2010 01:28:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/31/125347.htmlhttp://m.shnenglu.com/sdz/comments/125347.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/31/125347.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/125347.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/125347.html      Blocks

Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 720 Accepted: 201

Description

Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to think of a math problem of painting. Suppose there are N blocks in a line and each block can be paint red, blue, green or yellow. For some myterious reasons, Panda want both the number of red blocks and green blocks to be even numbers. Under such conditions, Panda wants to know the number of different ways to paint these blocks.

Input

The first line of the input contains an integer T(1≤T≤100), the number of test cases. Each of the next T lines contains an integer N(1≤N≤10^9) indicating the number of blocks.

Output

For each test cases, output the number of ways to paint the blocks in a single line. Since the answer may be quite large, you have to module it by 10007.

Sample Input

2
1
2

Sample Output

2
6

Source



緇欏畾涓鍧楁湁n涓偣鐨勬湪鍧楋紝鐢ㄥ洓縐嶉鑹叉秱鑹詫紝鍏朵腑涓ょ棰滆壊鍙兘鐢ㄥ伓鏁版錛屾眰鏈夊灝戠娑傝壊鏂規硶銆?br>
涓鐪嬪氨鐭ユ槸鐢熸垚鍑芥暟錛屽彲鎯滀粠娌$敤榪囥傚皬璇曡韓鎵嬶紝娌℃兂鍒扮珶鐒跺紕鍑烘潵浜嗐傜粨鏋滃簲璇ユ槸瀵圭殑錛屽氨鏄笉鐭ヨ繃紼嬫槸涓嶆槸鍙互榪欐牱鍐欍?br>璁懼洓縐嶉鑹插垎鍒負w錛寈錛寉錛寊錛屽叾涓瓂錛寊鍙兘鐢ㄥ伓鏁版錛屾垜鐨勬帹瀵艱繃紼嬪涓嬶細

鏈鍚庡緱鍒扮殑鍏紡鏄?2^( n - 1 ))(2^(n-1)+1)
娉ㄦ剰鍒?0007鏄礌鏁?鐢辮垂灝旈┈瀹氱悊,鍙互鍏堟妸n-1mod錛?0007-1錛?鍑忓皬璁$畻閲?鍓╀笅鐨勫氨鏄揩閫熷彇騫備簡.
#include <iostream>
using namespace std;
const int mod=10007;
int pow(int n)
{
    
if(n==0)
        
return 1;
    
if(n&1)
    
{
        
return (pow(n-1)<<1)%mod;
    }

    
else
    
{
        
int temp=pow(n>>1);
        
return (temp*temp)%mod;
    }

}


int main(int argc, char *argv[])
{
    
int t,n,temp;
    cin
>>t;
    
while(t--)
    
{
        cin
>>n;
        temp
=pow((n-1)%(mod-1));
        cout
<<(temp*(temp+1))%mod<<endl;
    }

    
    
return 0;
}

//鐢變簬榪戞棩POJ鐧諱笉涓婏紝涓婇潰鐨勪唬鐮佹湭鏇炬彁浜よ繃


鑻ヤ綑 2010-08-31 09:28 鍙戣〃璇勮
]]>
poj 2348 Euclid's Game 鍗氬紙 鍙栧瓙http://m.shnenglu.com/sdz/archive/2010/08/29/125124.html鑻ヤ綑鑻ヤ綑Sun, 29 Aug 2010 01:27:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/29/125124.htmlhttp://m.shnenglu.com/sdz/comments/125124.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/29/125124.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/125124.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/125124.htmlEuclid's Game
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 4525 Accepted: 1849

Description

Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of the lesser of the two numbers from the greater of the two numbers, provided that the resulting number must be nonnegative. Then Ollie, the second player, does the same with the two resulting numbers, then Stan, etc., alternately, until one player is able to subtract a multiple of the lesser number from the greater to reach 0, and thereby wins. For example, the players may start with (25,7):
         25 7

11 7
4 7
4 3
1 3
1 0

an Stan wins.

Input

The input consists of a number of lines. Each line contains two positive integers giving the starting two numbers of the game. Stan always starts.

Output

For each line of input, output one line saying either Stan wins or Ollie wins assuming that both of them play perfectly. The last line of input contains two zeroes and should not be processed.

Sample Input

34 12
15 24
0 0

Sample Output

Stan wins
Ollie wins

Source

Waterloo local 2002.09.28

緇欏畾涓ゅ爢鐭沖瓙,浜屼漢杞祦鍙栧瓙,瑕佹眰鍙兘浠庣煶瀛愭暟鐩緝澶х殑閭d竴鍫嗗彇瀛?鍙栧瓙鐨勬暟鐩彧鑳芥槸鍙︿竴鍫嗙煶瀛愭暟鐩殑鍊嶆暟.鏈緇堜嬌寰楁煇涓鍫嗘暟鐩負闆剁殑涓鏂逛負鑳?

棣栧厛,瀹規槗鐪嬪嚭,瀵逛簬姣忎竴涓眬闈?瑕佷箞鏄厛鎵嬪繀鑳?瑕佷箞鏄悗鎵嬪繀鑳?鏈緇堢粨鏋滃畬鍏ㄧ敱褰撳墠灞闈㈠畬鍏ㄧ‘瀹?

鍙﹀,鍙互綆鍗曠綏鍒椾竴涓嬪厛鎵嬪繀鑳滃拰蹇呰觸鐨勫嚑縐嶅眬闈?涓ゅ爢鐭沖瓙鍒濆鏁扮洰閮藉ぇ浜庨浂):

1,鏈変竴鍫嗙煶瀛愭暟鐩負涓,鍏堟墜蹇呰儨,聽 1,4,聽聽聽 1,2.
2,涓ゅ爢鐭沖瓙鏁扮洰宸竴,涓斾袱鍫嗙煶瀛愭暟鐩兘涓嶄負涓,鍏堟墜蹇呰觸(鍙兘浣垮悗鎵嬮潰瀵瑰繀鑳滅殑灞闈?,濡偮?3,4聽 5,6聽聽 .
3,濡傛灉鏁扮洰杈冨ぇ鐨勯偅涓鍫嗘槸鏁扮洰杈冨皬閭d竴鍫嗙殑2鍊嶅姞鍑忎竴,涓斾笉鏄笂闈袱縐嶅眬闈?鍏堟墜蹇呰儨,2,5聽 3,5聽 3,7.

鍙槸涓婇潰榪欎簺淇℃伅瀵逛簬瑙e喅榪欎釜闂榪樻槸鏈変竴浜涘洶闅?

鍐嶈繘涓姝ヨ瘯綆楁暟鐩緝灝忕殑鐭沖瓙,鍙互鍙戠幇,褰撲袱鍫嗘暟鐩浉宸緝澶ф椂,鎬繪槸鍏堟墜蹇呰儨.
浜嬪疄涓?榪涗竴姝ユ帰璁ㄥ彲浠ュ彂鐜頒笅闈㈢殑緇撹:

1,N<2*M-1鏃?鍏堟墜鍒棤閫夋嫨,鍙兘浣夸箣鍙樹負 N-M,M 灞闈?(鏄撹)濡?,5聽 5,7聽 7,4...

2,璁句袱鍫嗙煶瀛愭暟鐩負N,M(N>M>0,涓擭,M浜掕川),鍒欒嫢N>=2*M-1,涓擭 - M ! =1鏃?鍏堟墜蹇呰儨.瑕佹眰M,N浜掕川鏄洜涓哄浜嶮,N鏈夊叕鍥犳暟鐨勬儏褰?鍙互鍚屾椂闄や互鍏跺叕鍥犳暟鑰屼笉褰卞搷緇撴灉.

綆鍗曡鏄庝竴涓嬩笂闈㈢粨璁?鐨勭敱鏉? N>=2*M-1鏃?鍏堟墜鍙嬌涔嬪彉涓郝?N%M,M聽 鎴朜%M+M,M涓ょ灞闈箣涓,鍏朵腑鏈変笖鍙湁涓涓繀璐ュ眬闈€傛敞鎰忓埌濡傛灉N%M,M涓嶆槸蹇呰觸灞闈紝閭d箞N%M+M,M灝辨槸蹇呰觸灞闈紝鍥犱負闈㈠N%M+M,M榪欎釜灞闈紝浣犲埆鏃犻夋嫨錛屽彧鑳藉湪鍓嶄竴鍫嗕腑鍙朚涓嬌瀵規柟闈㈠蹇呰儨灞闈?緇撹1 )銆?br />

鎹鍙璁$畻娉曞涓?
1.M,N鍏堝悓鏃墮櫎浠ュ畠浠殑鏈澶у叕鍥犳暟.(M<N)
2,濡傛灉M==0,鍒欒繑鍥為浂;
3,濡傛灉M==1,鍒欒繑鍥炰竴;
4,濡傛灉N>=M*2-1,鍒欒繑鍥炰竴
5,浠=M,M=N-M,閫掑綊澶勭悊

#include聽<iostream>
usingnamespace聽std;
longlong聽gcd(longlong聽a,longlong聽b)
{
聽聽聽聽
if(a==0)
聽聽聽聽聽聽聽聽
return聽b;
聽聽聽聽
return聽gcd(b%a,a);
}

longlong聽Eu(longlong聽m,longlong聽n)
{
聽聽聽聽
if(m==1)
聽聽聽聽聽聽聽聽
return1;
聽聽聽聽
if(n-m==1&&聽m)
聽聽聽聽聽聽聽聽
return0;
聽聽聽聽
if(n>=m*2-1)
聽聽聽聽聽聽聽聽
return1;
聽聽聽聽
return!Eu(n%m,m);
}


int聽聽main()
{
聽聽聽聽
longlong聽m,n,temp;
聽聽聽聽
while聽(cin>>m>>n聽&&聽(m||n))
聽聽聽聽
{
聽聽聽聽聽聽聽聽
longlong聽g=gcd(m,n);
聽聽聽聽聽聽聽聽m
/=g;
聽聽聽聽聽聽聽聽n
/=g;
聽聽聽聽聽聽聽聽
if(m>n)
聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽temp
=m;
聽聽聽聽聽聽聽聽聽聽聽聽m
=n;
聽聽聽聽聽聽聽聽聽聽聽聽n
=temp;
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽
if(Eu(m,n))
聽聽聽聽聽聽聽聽聽聽聽聽cout
<<"Stan聽wins"<<endl;
聽聽聽聽聽聽聽聽
else
聽聽聽聽聽聽聽聽聽聽聽聽cout
<<"Ollie聽wins"<<endl;
聽聽聽聽}

聽聽聽聽
聽聽聽聽
return0;
}






鑻ヤ綑 2010-08-29 09:27 鍙戣〃璇勮
]]>
Poj 2153 Rank List --map / 璁℃暟鎺掑簭http://m.shnenglu.com/sdz/archive/2010/08/28/125050.html鑻ヤ綑鑻ヤ綑Sat, 28 Aug 2010 07:10:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/28/125050.htmlhttp://m.shnenglu.com/sdz/comments/125050.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/28/125050.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/125050.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/125050.htmlRank List
Time Limit: 10000MS Memory Limit: 65536K
Total Submissions: 6561 Accepted: 2091

Description

Li Ming is a good student. He always asks the teacher about his rank in his class after every exam, which makes the teacher very tired. So the teacher gives him the scores of all the student in his class and asked him to get his rank by himself. However, he has so many classmates, and he can鈥檛 know his rank easily. So he tends to you for help, can you help him?

Input

The first line of the input contains an integer N (1 <= N <= 10000), which represents the number of student in Li Ming鈥檚 class. Then come N lines. Each line contains a name, which has no more than 30 letters. These names represent all the students in Li Ming鈥檚 class and you can assume that the names are different from each other.

In (N+2)-th line, you'll get an integer M (1 <= M <= 50), which represents the number of exams. The following M parts each represent an exam. Each exam has N lines. In each line, there is a positive integer S, which is no more then 100, and a name P, which must occur in the name list described above. It means that in this exam student P gains S scores. It鈥檚 confirmed that all the names in the name list will appear in an exam.

Output

The output contains M lines. In the i-th line, you should give the rank of Li Ming after the i-th exam. The rank is decided by the total scores. If Li Ming has the same score with others, he will always in front of others in the rank list.

Sample Input

3
Li Ming
A
B
2
49 Li Ming
49 A
48 B
80 A
85 B
83 Li Ming

Sample Output

1
2

Source

POJ Monthly,Li Haoyuan

緇欏畾姣忎釜浜虹殑鎴愮嘩錛屾煡璇㈡煇涓浜虹殑鍚嶆銆?br />
鐢∕AP寤虹珛浜哄悕鍜屾垚緇╃殑瀵瑰簲鍏崇郴錛岀敤cnt鏁扮粍錛堟渶澶?000涓厓绱狅級璁板綍鎴愮嘩涓烘煇涓垎鏁扮殑浜烘暟錛屼笉榪囩敱浜庢諱漢鏁拌緝灝?鏈澶氬彧鏈?0000浜?,鐩存帴閬嶅巻涔熶笉姣斿緩绔嬭鏁版帓搴忔暟緇勫鐢ㄥ灝戞椂闂?璁℃暟鎺掑簭鐨勪紭鍔垮茍涓嶆樉钁?

鐢╤ash鍑芥暟鎴栬呬簩鍒嗘煡鎵句篃搴旇鑳借В鍐寵繖涓棶棰?

/*Source聽Code

Problem:聽2153聽聽User:聽y09
Memory:聽1236K聽聽Time:聽1204MS聽
Language:聽C++聽聽Result:聽Accepted聽

Source聽Code聽
*/

#include聽
<iostream>
#include
<string>
#include
<map>
usingnamespace聽std;
int聽main(int聽argc,聽char*argv[])
{
聽聽聽聽
int聽n,m;
聽聽聽聽
int聽i,j;
聽聽聽聽
char聽str[200];
聽聽聽聽
string聽str1;
聽聽聽聽
聽聽聽聽map
<string聽,int>score;
聽聽聽聽
聽聽聽聽scanf(
"%d",&n);
聽聽聽聽getchar();


聽聽聽聽
for聽(i=0;i<n;i++聽)
聽聽聽聽
{
聽聽聽聽聽聽聽聽gets(str);
聽聽聽聽聽聽聽聽str1
=str;
聽聽聽聽聽聽聽聽score[str1]
=0;
聽聽聽聽}

聽聽聽聽
聽聽聽聽
int聽cnt[5005]={0};
聽聽聽聽
聽聽聽聽scanf(
"%d",&m);

聽聽聽聽
string聽li="Li聽Ming";

聽聽聽聽
int聽rank=0;
聽聽聽聽
int聽s=0;
聽聽聽聽
int聽temp=0;
聽聽聽聽
int聽temp2=0;
聽聽聽聽
int聽num;
聽聽聽聽
for(int聽k=0;k<m;k++)
聽聽聽聽
{
聽聽聽聽聽聽聽聽
for(i=0;i<n;i++)
聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽scanf(
"%d",&num);
聽聽聽聽聽聽聽聽聽聽聽聽getchar();
聽聽聽聽聽聽聽聽聽聽聽聽gets(str);
聽聽聽聽聽聽聽聽聽聽聽聽str1
=str;
聽聽聽聽聽聽聽聽聽聽聽聽temp2
=score[str1];
聽聽聽聽聽聽聽聽聽聽聽聽score[str1]
=num+temp2;
聽聽聽聽聽聽聽聽聽聽聽聽cnt[num
+temp2]++;
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽s
=score[li];
聽聽聽聽聽聽聽聽rank
=1;
聽聽聽聽聽聽聽聽temp
+=100;
聽聽聽聽聽聽聽聽
for(i=temp;i>s;i--)
聽聽聽聽聽聽聽聽
{
聽聽聽聽聽聽聽聽聽聽聽聽rank
+=cnt[i];
聽聽聽聽聽聽聽聽聽聽聽聽cnt[i]
=0;
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽
for(i=s;i>=0;i--)
聽聽聽聽聽聽聽聽聽聽聽聽cnt[i]
=0;
聽聽聽聽聽聽聽聽printf(
"%d\n",rank);
聽聽聽聽}

聽聽聽聽
return0;
}




鑻ヤ綑 2010-08-28 15:10 鍙戣〃璇勮
]]>
1430 Binary Stirling Numbers 鏂壒鐏墊暟 http://m.shnenglu.com/sdz/archive/2010/08/28/125004.html鑻ヤ綑鑻ヤ綑Sat, 28 Aug 2010 00:51:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/28/125004.htmlhttp://m.shnenglu.com/sdz/comments/125004.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/28/125004.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/125004.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/125004.htmlBinary Stirling Numbers
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 1040 Accepted: 346

Description

The Stirling number of the second kind S(n, m) stands for the number of ways to partition a set of n things into m nonempty subsets. For example, there are seven ways to split a four-element set into two parts:

{1, 2, 3} U {4}, {1, 2, 4} U {3}, {1, 3, 4} U {2}, {2, 3, 4} U {1}

{1, 2} U {3, 4}, {1, 3} U {2, 4}, {1, 4} U {2, 3}.


There is a recurrence which allows to compute S(n, m) for all m and n.

S(0, 0) = 1; S(n, 0) = 0 for n > 0; S(0, m) = 0 for m > 0;
S(n, m) = m S(n - 1, m) + S(n - 1, m - 1), for n, m > 0.


Your task is much "easier". Given integers n and m satisfying 1 <= m <= n, compute the parity of S(n, m), i.e. S(n, m) mod 2.


Example

S(4, 2) mod 2 = 1.


Task

Write a program which for each data set:
reads two positive integers n and m,
computes S(n, m) mod 2,
writes the result.

Input

The first line of the input contains exactly one positive integer d equal to the number of data sets, 1 <= d <= 200. The data sets follow.

Line i + 1 contains the i-th data set - exactly two integers ni and mi separated by a single space, 1 <= mi <= ni <= 10^9.

Output

The output should consist of exactly d lines, one line for each data set. Line i, 1 <= i <= d, should contain 0 or 1, the value of S(ni, mi) mod 2.

Sample Input

1
4 2

Sample Output

1

Source


鍒ゆ柇絎簩綾繪柉鐗圭伒鏁版ā 2 鐨勪綑鏁般?br>
鍦ㄥ垬姹濅匠鐨勯粦涔︿笂鏈夎緇嗚В絳旓紝鍩烘湰鎬濊礬鏄灇涓炬暟鍊艱緝灝忕殑鏂壒鐏墊暟錛屼粠涓鎵捐寰嬨?br>
涓嬮潰榪欏箙鍥炬槸浠庣淮鍩虹櫨縐戞埅鍑烘潵鐨勶紝鏈変竴涓簩榪涘埗鏂壒鐏墊暟涓庣粍鍚堟暟鐨勮漿鍖栧叕寮忋傝岀粍鍚堟暟妯′簩鐨勪綑鏁板氨寰堝鏄撲簡銆?br>
鎴戜滑鐭ラ亾錛岀粍鍚堟暟C錛圢,M錛?N ! / M ! /(N-M)!,鍥犺屽彧闇姹傚緱闃朵箻璐ㄥ洜鏁板垎瑙e紡涓簩鐨勯噸鏁板嵆鍙В鍐抽棶棰樸?br>鑰孨 錛佽川鍥犳暟鍒嗚В鍚?鐨勯噸鏁板彲鐢ㄤ笅寮忔潵璁$畻涔嬨?br>K=N/2+N/2^2+N/2^3+....
涓婂紡鐨勯櫎娉曞叏鏄笅鍙栨暣銆傦紙鍙弬瑙佷換浣曚竴鏈垵絳夋暟璁鴻鏈紝濡傚寳澶ф綐鎵挎礊緙栫殑閭f湰銆婂垵絳夋暟璁恒嬶級銆?br>
榪欐牱錛岃繖涓棶棰樺氨榪庡垉鑰岃В銆?br>
鍙﹀錛屾湁涓鐐硅鏄庣殑鏄笂闈㈤偅涓浘褰紝灝辨槸鍒嗗艦鍑犱綍涓竴涓緢閲嶈鐨勪緥瀛愨斺旇阿褰柉鍩哄灚鐗囥傛潹杈変笁瑙掍篃鏈夌被浼肩殑褰㈢姸銆?br>榪欐槸鎴戠敤MATLAB浣滅殑涓涓潹杈変笁瑙掔殑浜岃繘鍒跺浘褰€?br>
#include <stdio.h>
int main(int argc, char *argv[])
{
    
    
int n,m;
    
int z,w1,w2;
    
int t;
    
int a,b,c;
    scanf(
"%d",&t);
    
    
while (t--)
    
{
        scanf(
"%d%d",&n,&m);
        z
=n-(m+2)/2;
        w1
=(m-1)/2;
        w2
=z-w1;
        a
=0;
        
while (z)
        
{
            z
>>=1;
            a
+=z;
        }

        b
=0;
        
while (w1)
        
{
            w1
>>=1;
            b
+=w1;
        }

        c
=0;
        
while (w2)
        
{
            w2
>>=1;
            c
+=w2;
        }

        printf(
"%d\n",(a-b-c)==0);

    }

    
    
return 0;
}





鑻ヤ綑 2010-08-28 08:51 鍙戣〃璇勮
]]>
POJ 3318 Matrix Multiplication 闅忔満鍖栫畻娉?/title><link>http://m.shnenglu.com/sdz/archive/2010/08/27/124959.html</link><dc:creator>鑻ヤ綑</dc:creator><author>鑻ヤ綑</author><pubDate>Fri, 27 Aug 2010 10:20:00 GMT</pubDate><guid>http://m.shnenglu.com/sdz/archive/2010/08/27/124959.html</guid><wfw:comment>http://m.shnenglu.com/sdz/comments/124959.html</wfw:comment><comments>http://m.shnenglu.com/sdz/archive/2010/08/27/124959.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/sdz/comments/commentRss/124959.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sdz/services/trackbacks/124959.html</trackback:ping><description><![CDATA[<div id="hvzpftn" class=ptt lang=zh-CN>Matrix Multiplication</div> <div id="hvzpftn" class=plm> <table align=center> <tbody> <tr> <td><strong>Time Limit:</strong> 2000MS</td> <td width=10></td> <td><strong>Memory Limit:</strong> 65536K</td> </tr> <tr> <td><strong>Total Submissions:</strong> 11924</td> <td width=10></td> <td><strong>Accepted:</strong> 2408</td> </tr> </tbody> </table> </div> <p class=pst>Description</p> <div id="hvzpftn" class=ptx lang=zh-CN> <p>You are given three <em>n</em> × <em>n</em> matrices <em>A</em>, <em>B</em> and <em>C</em>. Does the equation <em>A</em> × <em>B</em> = <em>C</em> hold true?</p> </div> <p class=pst>Input</p> <div id="hvzpftn" class=ptx lang=zh-CN> <p>The first line of input contains a positive integer <em>n</em> (<em>n</em> ≤ 500) followed by the the three matrices <em>A</em>, <em>B</em> and <em>C </em>respectively. Each matrix's description is a block of n × n integers.</p> <p>It guarantees that the elements of <em>A</em> and <em>B</em> are less than 100 in absolute value and elements of <em>C</em> are less than 10,000,000 in absolute value.</p> </div> <p class=pst>Output</p> <div id="hvzpftn" class=ptx lang=zh-CN> <p>Output "YES" if the equation holds true, otherwise "NO".</p> </div> <p class=pst>Sample Input</p> <pre class=sio>2 1 0 2 3 5 1 0 8 5 1 10 26 </pre> <p class=pst>Sample Output</p> <pre class=sio>YES</pre> <p class=pst>Hint</p> <div id="hvzpftn" class=ptx lang=zh-CN>Multiple inputs will be tested. So O(n<sup>3</sup>) algorithm will get TLE.</div> <p class=pst>Source<br><br></p> 緇欏畾鐭╅樀A鍜孊錛屽垽鏂煩闃礐鏄笉鏄畠浠殑涔樼Н銆?br><br>棰樼洰鏄庣‘琛ㄧず鐩存帴鍒ゆ柇浼氳秴鏃訛紝鑰孲trass鍜岀洿鎺ョ浉涔樼殑O錛坣^3錛夋晥鏋滅浉宸笉澶氥?br>鍥犺岄噰鐢ㄩ殢鏈哄寲鏂規硶錛屾寜鎴戣嚜宸辯殑鎯蟲硶錛岄殢鏈烘祴璇旵涓殑鑻ュ共鍏冪礌錛屼互紜畾緇撴灉錛岀湅浜嗚璁哄尯錛屾墠鍙戠幇鏈夋洿鍔?#8220;涓撲笟”鐨勫姙娉曘?br>闅忔満鐢熸垚琛屽悜閲廔錛屽垯鑻*B=C錛岄偅涔堝繀鏈塈*A*B=I*C錛涘弽涔嬶紝涓嶄竴瀹氭垚绔嬶紝綆楁硶鐨勯殢鏈烘ф浣撶幇鍦ㄨ繖閲屻?br>鐢ㄤ竴涓繀瑕佷笉鍏呭垎鏉′歡鏉ュ垽鏂粨鏋滅殑姝g‘鎬э紝姣旂洸鐩祴璇曟晥鏋滃線寰瑕佸ソ寰楀銆?br>榪欎釜蹇呰鏉′歡鍒ゆ柇緇撴灉鐨勬椂闂村鏉傚害鏄疧錛圢^2錛夌殑錛岃繖鏄鐩緭鍏ユ暟鎹噺鍙互鎺ュ彈鐨勩?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 id=Codehighlighter1_0_115_Open_Image onclick="this.style.display='none'; Codehighlighter1_0_115_Open_Text.style.display='none'; Codehighlighter1_0_115_Closed_Image.style.display='inline'; Codehighlighter1_0_115_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_0_115_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_0_115_Closed_Text.style.display='none'; Codehighlighter1_0_115_Open_Image.style.display='inline'; Codehighlighter1_0_115_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span id=Codehighlighter1_0_115_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">/**/</span><span id=Codehighlighter1_0_115_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000">Source Code<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>Problem: 3318  User: y09 <br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>Memory: 3080K  Time: 1063MS <br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>Language: C  Result: Accepted <br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>Source Code </span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdio.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">time.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdlib.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_184_953_Open_Image onclick="this.style.display='none'; Codehighlighter1_184_953_Open_Text.style.display='none'; Codehighlighter1_184_953_Closed_Image.style.display='inline'; Codehighlighter1_184_953_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_184_953_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_184_953_Closed_Text.style.display='none'; Codehighlighter1_184_953_Open_Image.style.display='inline'; Codehighlighter1_184_953_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_184_953_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_184_953_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i,j;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> mat1[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">][</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">];<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> mat2[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">][</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">];<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> mat3[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">][</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">];<br><img id=Codehighlighter1_285_287_Open_Image onclick="this.style.display='none'; Codehighlighter1_285_287_Open_Text.style.display='none'; Codehighlighter1_285_287_Closed_Image.style.display='inline'; Codehighlighter1_285_287_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_285_287_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_285_287_Closed_Text.style.display='none'; Codehighlighter1_285_287_Open_Image.style.display='inline'; Codehighlighter1_285_287_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    __int64 te1[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span id=Codehighlighter1_285_287_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_285_287_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 id=Codehighlighter1_308_310_Open_Image onclick="this.style.display='none'; Codehighlighter1_308_310_Open_Text.style.display='none'; Codehighlighter1_308_310_Closed_Image.style.display='inline'; Codehighlighter1_308_310_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_308_310_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_308_310_Closed_Text.style.display='none'; Codehighlighter1_308_310_Open_Image.style.display='inline'; Codehighlighter1_308_310_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    __int64 te2[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span id=Codehighlighter1_308_310_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_308_310_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 id=Codehighlighter1_331_333_Open_Image onclick="this.style.display='none'; Codehighlighter1_331_333_Open_Text.style.display='none'; Codehighlighter1_331_333_Closed_Image.style.display='inline'; Codehighlighter1_331_333_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_331_333_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_331_333_Closed_Text.style.display='none'; Codehighlighter1_331_333_Open_Image.style.display='inline'; Codehighlighter1_331_333_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    __int64 te3[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span id=Codehighlighter1_331_333_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_331_333_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 id=Codehighlighter1_354_356_Open_Image onclick="this.style.display='none'; Codehighlighter1_354_356_Open_Text.style.display='none'; Codehighlighter1_354_356_Closed_Image.style.display='inline'; Codehighlighter1_354_356_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_354_356_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_354_356_Closed_Text.style.display='none'; Codehighlighter1_354_356_Open_Image.style.display='inline'; Codehighlighter1_354_356_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    __int64 te4[</span><span style="COLOR: #000000">500</span><span style="COLOR: #000000">]</span><span style="COLOR: #000000">=</span><span id=Codehighlighter1_354_356_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_354_356_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://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    time_t t;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    srand((unsigned) time(</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">t));<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">n);<br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">mat1[i][j]);<br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">mat2[i][j]);<br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">mat3[i][j]);<br><img src="http://m.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">0</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">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        te1[i]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">rand()</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">100</span><span style="COLOR: #000000">;<br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            te2[i]</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">te1[j]</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">mat1[j][i];<br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            te3[i]</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">te2[j]</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">mat2[j][i];<br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            te4[i]</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">te1[j]</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">mat3[j][i];<br><img src="http://m.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">0</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">)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(te3[i]</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">te4[i])<br><img id=Codehighlighter1_892_924_Open_Image onclick="this.style.display='none'; Codehighlighter1_892_924_Open_Text.style.display='none'; Codehighlighter1_892_924_Closed_Image.style.display='inline'; Codehighlighter1_892_924_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_892_924_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_892_924_Closed_Text.style.display='none'; Codehighlighter1_892_924_Open_Image.style.display='inline'; Codehighlighter1_892_924_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_892_924_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_892_924_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            puts(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">NO</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="http://m.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://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    puts(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">YES</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.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://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <br><br> <img src ="http://m.shnenglu.com/sdz/aggbug/124959.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sdz/" target="_blank">鑻ヤ綑</a> 2010-08-27 18:20 <a href="http://m.shnenglu.com/sdz/archive/2010/08/27/124959.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>poj 1195 Mobile phones 浜岀淮鏍戠姸鏁扮粍http://m.shnenglu.com/sdz/archive/2010/08/27/124949.html鑻ヤ綑鑻ヤ綑Fri, 27 Aug 2010 08:28:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/27/124949.htmlhttp://m.shnenglu.com/sdz/comments/124949.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/27/124949.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/124949.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/124949.htmlMobile phones
Time Limit: 5000MS Memory Limit: 65536K
Total Submissions: 7087 Accepted: 3030

Description

Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows and columns numbered from 0 to S-1. Each square contains a base station. The number of active mobile phones inside a square can change because a phone is moved from a square to another or a phone is switched on or off. At times, each base station reports the change in the number of active phones to the main base station along with the row and the column of the matrix.

Write a program, which receives these reports and answers queries about the current total number of active mobile phones in any rectangle-shaped area.

Input

The input is read from standard input as integers and the answers to the queries are written to standard output as integers. The input is encoded as follows. Each input comes on a separate line, and consists of one instruction integer and a number of parameter integers according to the following table.

The values will always be in range, so there is no need to check them. In particular, if A is negative, it can be assumed that it will not reduce the square value below zero. The indexing starts at 0, e.g. for a table of size 4 * 4, we have 0 <= X <= 3 and 0 <= Y <= 3.

Table size: 1 * 1 <= S * S <= 1024 * 1024
Cell value V at any time: 0 <= V <= 32767
Update amount: -32768 <= A <= 32767
No of instructions in input: 3 <= U <= 60002
Maximum number of phones in the whole table: M= 2^30

Output

Your program should not answer anything to lines with an instruction other than 2. If the instruction is 2, then your program is expected to answer the query by writing the answer as a single line containing a single integer to standard output.

Sample Input

0 4
1 1 2 3
2 0 0 2 2
1 1 1 2
1 1 2 -1
2 1 1 2 3
3

Sample Output

3
4

Source


涓緇存爲鐘舵暟緇勭敤涓緇存暟緇勬潵瀛樺偍閮ㄥ垎鍏冪礌鐨勫拰錛屼簩緇存爲鐘舵暟緇勫彧闇鐢ㄤ簩緇存暟緇勬潵瀛樺偍鍗沖彲錛岃幏寰楀拰錛屼慨姝g殑鍑芥暟鍚屼竴緇存暟緇勫樊鍒笉澶с?br>
/*Source Code

Problem: 1195  User: y09 
Memory: 4956K  Time: 579MS 
Language: C++  Result: Accepted 

Source Code 
*/

#include 
<stdio.h>
const int MAX=1200;
int c[MAX][MAX];
int n;
int LowBit(int t)
{
    
return t&(t^(t-1));
}


int Sum(int endx,int endy)
{
    
int sum=0;
    
int temp=endy;
    
while(endx>0)
    
{
        endy
=temp;//娉ㄦ剰璁板綍endy鐨勫鹼紝鏈漢鍦ㄦ鍑洪敊錛屾壘鍗婂ぉ閿欒涓嶅緱
        while (endy>0)
        
{
            sum
+=c[endx][endy];
            endy
-=LowBit(endy);
        }

        
        endx
-=LowBit(endx);
    }

    
return sum;
}

void plus(int posx,int posy,int num)
{
    
int temp=posy;
    
while (posx <=n)
    
{
        posy
=temp;
        
while(posy<=n)
        
{
            c[posx][posy]
+=num;
            posy
+=LowBit(posy);
        }

        posx
+=LowBit(posx);
    }

}

int GetSum(int l,int b,int r,int t)
{
    
return Sum(r,t)-Sum(r,b-1)-Sum(l-1,t)+Sum(l-1,b-1);
}

int main()
{
    
int I;
    
int x,y,a;
    
int l,b,r,t;
    
while(scanf("%d",&I))
    
{
        
switch (I)
        
{
        
case 0:
            scanf(
"%d",&n);
            
break;
        
case 1:
            scanf(
"%d%d%d",&x,&y,&a);
            plus(x
+1,y+1,a);
            
break;
        
case 2:
            scanf(
"%d%d%d%d",&l,&b,&r,&t);
            printf(
"%d\n",GetSum(l+1,b+1,r+1,t+1));
            
break;
        
case 3:
            
return 0;
            
        }

    }

    
    
return 0;
}



鑻ヤ綑 2010-08-27 16:28 鍙戣〃璇勮
]]>
POJ 1026 Cipherhttp://m.shnenglu.com/sdz/archive/2010/08/25/124625.html鑻ヤ綑鑻ヤ綑Wed, 25 Aug 2010 01:29:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/25/124625.htmlhttp://m.shnenglu.com/sdz/comments/124625.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/25/124625.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/124625.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/124625.htmlCipher
Time Limit: 1000MS  Memory Limit: 10000K
Total Submissions: 12776  Accepted: 3194


Description
Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their encoding and decoding is based on secret keys. They chose the secret key at their last meeting in Philadelphia on February 16th, 1996. They chose as a secret key a sequence of n distinct integers, a1 ; . . .; an, greater than zero and less or equal to n. The encoding is based on the following principle. The message is written down below the key, so that characters in the message and numbers in the key are correspondingly aligned. Character in the message at the position i is written in the encoded message at the position ai, where ai is the corresponding number in the key. And then the encoded message is encoded in the same way. This process is repeated k times. After kth encoding they exchange their message.

The length of the message is always less or equal than n. If the message is shorter than n, then spaces are added to the end of the message to get the message with the length n.

Help Alice and Bob and write program which reads the key and then a sequence of pairs consisting of k and message to be encoded k times and produces a list of encoded messages.

Input
The input file consists of several blocks. Each block has a number 0 < n <= 200 in the first line. The next line contains a sequence of n numbers pairwise distinct and each greater than zero and less or equal than n. Next lines contain integer number k and one message of ascii characters separated by one space. The lines are ended with eol, this eol does not belong to the message. The block ends with the separate line with the number 0. After the last block there is in separate line the number 0.

Output
Output is divided into blocks corresponding to the input blocks. Each block contains the encoded input messages in the same order as in input file. Each encoded message in the output file has the lenght n. After each block there is one empty line.

Sample Input
10
4 5 3 7 2 8 1 6 10 9
1 Hello Bob
1995 CERC
0
0

Sample Output
BolHeol  b
C RCE


Source
Central Europe 1995

緇欏畾1~n鐨勭疆鎹,姹傚叾鍙樻崲m嬈$殑鍙樻崲F^m.
鍏堟壘鍒板驚鐜妭,鍐嶇敤m瀵瑰驚鐜妭鐨勯暱搴﹀彇妯″嵆鍙?

#include <iostream>
using namespace std;

int main()
{
    
const int MAX=300;//鏈澶ч暱搴?/span>
    char str[MAX];//璇誨叆涓?/span>
    int n;//鍙樻崲鐨勯暱搴?/span>
    
    
int data[MAX]={0};//瀛樻斁鍘熷鍙樻崲
    int used[MAX]={0};//鏍囧織鏁扮粍
    int cir[MAX][MAX]={0};//姣忎釜寰幆鑺傜殑鎴愬憳
    int num[MAX]={0};//寰幆鑺傚搴旈暱搴?/span>
    int cnt=0;//寰幆鑺傜殑涓暟
    
    
int time=0;//鍙樻崲嬈℃暟
    int change[MAX]={0};//鍘熷寰幆鍙樻崲time嬈′箣鍚庣殑鍙樻崲
    
    
char res[MAX]={0};//鍙樻崲涔嬪悗鐨勫瓧絎︿覆
    
    

    
int i,j;
    
while(cin>>&& n)
    
{
        memset(used,
0,sizeof(used));
        memset(num,
0,sizeof(num));
        
for(i=1;i<=n;i++)
            cin
>>data[i];
        cnt
=0;//璁℃暟寰幆鑺備釜鏁?/span>
        for(i=1;i<=n;i++)
        
{
            
if(used[i]==0)
            
{
            
                used[i]
=1;
                
int temp=data[i];
                cir[cnt][num[cnt]]
=temp;
                num[cnt]
=1;
                
while(used[temp]==0)//鑾峰緱寰幆鑺?/span>
                {
                    used[temp]
=1;
                    temp
=data[temp];
                    cir[cnt][num[cnt]
++]=temp;    
                }

                cnt
++;
            }

        }
    
        
while(cin>>time && time)//璇誨叆鍙樻崲嬈℃暟
        {
            memset(res,
0,sizeof(res));
            memset(str,
0,sizeof(str));
            gets(str);
            
int len=strlen(str);
            
for(i=len;i<=n;i++)//浣嶆暟涓嶈凍n,琛ョ┖鏍?/span>
                str[i]=' ';

            
//鑾峰緱鍙樻崲
            for(i=0;i<cnt;i++)
            
{
                
for(j=0;j<num[i];j++)
                
{
                    change[cir[i][j]]
=cir[i][(j+time)%num[i]];
                }

            }


            
//瀵硅鍏ユ暟鎹彉鎹?鑾峰緱緇撴灉
            for(i=1;i<=n;i++)
            
{
                res[change[i]]
=str[i];
            }

            cout
<<res+1<<endl;    
        }

        cout
<<endl;

    }


    
    
return 0;
}



鑻ヤ綑 2010-08-25 09:29 鍙戣〃璇勮
]]>
Poj 2785 4 Values whose Sum is 0 hash 鍝堝笇琛?/title><link>http://m.shnenglu.com/sdz/archive/2010/08/23/124349.html</link><dc:creator>鑻ヤ綑</dc:creator><author>鑻ヤ綑</author><pubDate>Mon, 23 Aug 2010 00:23:00 GMT</pubDate><guid>http://m.shnenglu.com/sdz/archive/2010/08/23/124349.html</guid><wfw:comment>http://m.shnenglu.com/sdz/comments/124349.html</wfw:comment><comments>http://m.shnenglu.com/sdz/archive/2010/08/23/124349.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/sdz/comments/commentRss/124349.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/sdz/services/trackbacks/124349.html</trackback:ping><description><![CDATA[<p>棰樻剰綆鍗?灝辨槸鎵懼洓涓暟鐨勫拰涓洪浂.鍏堟妸鍓嶄袱鍒楃殑鍜岀畻鍑烘潵,O(n^2),瀛樺埌hash琛ㄤ腑,鍐嶆妸鍚庝袱鍒楃殑涓や袱鍜岀畻鍑烘潵,鍦╤ash琛ㄤ腑鎵劇浉鍙嶆暟.鐢ㄧ嚎鎬ф帰嫻嬫硶灝卞彲浠ヨВ鍐寵闂浜?<br></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id=Codehighlighter1_0_122_Open_Image onclick="this.style.display='none'; Codehighlighter1_0_122_Open_Text.style.display='none'; Codehighlighter1_0_122_Closed_Image.style.display='inline'; Codehighlighter1_0_122_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_0_122_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_0_122_Closed_Text.style.display='none'; Codehighlighter1_0_122_Open_Image.style.display='inline'; Codehighlighter1_0_122_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span id=Codehighlighter1_0_122_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">/**/</span><span id=Codehighlighter1_0_122_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000">Source CodeProblem: 2785        User: y09shendazhi<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>Memory: 160132K        Time: 2610MS<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>Language: G++        Result: Accepted<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>Source Code</span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#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://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdio.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://m.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://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> size</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">20345677</span><span style="COLOR: #000000">;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> hash[size];<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> sum[size];<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> key</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1777</span><span style="COLOR: #000000">;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> MAX</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1000000000</span><span style="COLOR: #000000">;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> Insert(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> num)<br><img id=Codehighlighter1_307_440_Open_Image onclick="this.style.display='none'; Codehighlighter1_307_440_Open_Text.style.display='none'; Codehighlighter1_307_440_Closed_Image.style.display='inline'; Codehighlighter1_307_440_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_307_440_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_307_440_Closed_Text.style.display='none'; Codehighlighter1_307_440_Open_Image.style.display='inline'; Codehighlighter1_307_440_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_307_440_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_307_440_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">num;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    num</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(num</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">MAX)</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">size;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(hash[num]</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">MAX </span><span style="COLOR: #000000">&&</span><span style="COLOR: #000000"> hash[num]</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">temp)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        num</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(key</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">num)</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">size;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    hash[num]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">temp;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    sum[num]</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> Find(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> num)<br><img id=Codehighlighter1_460_619_Open_Image onclick="this.style.display='none'; Codehighlighter1_460_619_Open_Text.style.display='none'; Codehighlighter1_460_619_Closed_Image.style.display='inline'; Codehighlighter1_460_619_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_460_619_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_460_619_Closed_Text.style.display='none'; Codehighlighter1_460_619_Open_Image.style.display='inline'; Codehighlighter1_460_619_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_460_619_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_460_619_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">num;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    num</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(num</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">MAX)</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">size;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(hash[num]</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">MAX </span><span style="COLOR: #000000">&&</span><span style="COLOR: #000000"> hash[num]</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">temp)<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        num</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(num</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">key)</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">size;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(hash[num]</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">MAX)<br><img src="http://m.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://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> sum[num];<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_633_1003_Open_Image onclick="this.style.display='none'; Codehighlighter1_633_1003_Open_Text.style.display='none'; Codehighlighter1_633_1003_Closed_Image.style.display='inline'; Codehighlighter1_633_1003_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_633_1003_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_633_1003_Closed_Text.style.display='none'; Codehighlighter1_633_1003_Open_Image.style.display='inline'; Codehighlighter1_633_1003_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_633_1003_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_633_1003_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i,j;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> a[</span><span style="COLOR: #000000">4005</span><span style="COLOR: #000000">],b[</span><span style="COLOR: #000000">4005</span><span style="COLOR: #000000">],c[</span><span style="COLOR: #000000">4005</span><span style="COLOR: #000000">],d[</span><span style="COLOR: #000000">4005</span><span style="COLOR: #000000">];<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">n);<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> ans</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://m.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">0</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">)<br><img id=Codehighlighter1_740_788_Open_Image onclick="this.style.display='none'; Codehighlighter1_740_788_Open_Text.style.display='none'; Codehighlighter1_740_788_Closed_Image.style.display='inline'; Codehighlighter1_740_788_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_740_788_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_740_788_Closed_Text.style.display='none'; Codehighlighter1_740_788_Open_Image.style.display='inline'; Codehighlighter1_740_788_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_740_788_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_740_788_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d%d%d%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">a[i],</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">b[i],</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">c[i],</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">d[i]);<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://m.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">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">size;i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_812_830_Open_Image onclick="this.style.display='none'; Codehighlighter1_812_830_Open_Text.style.display='none'; Codehighlighter1_812_830_Closed_Image.style.display='inline'; Codehighlighter1_812_830_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_812_830_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_812_830_Closed_Text.style.display='none'; Codehighlighter1_812_830_Open_Image.style.display='inline'; Codehighlighter1_812_830_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_812_830_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_812_830_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        hash[i]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MAX;<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_870_894_Open_Image onclick="this.style.display='none'; Codehighlighter1_870_894_Open_Text.style.display='none'; Codehighlighter1_870_894_Closed_Image.style.display='inline'; Codehighlighter1_870_894_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_870_894_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_870_894_Closed_Text.style.display='none'; Codehighlighter1_870_894_Open_Image.style.display='inline'; Codehighlighter1_870_894_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_870_894_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_870_894_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        Insert(a[i]</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">b[j]);<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://m.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">0</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">)<br><img src="http://m.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">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_934_964_Open_Image onclick="this.style.display='none'; Codehighlighter1_934_964_Open_Text.style.display='none'; Codehighlighter1_934_964_Closed_Image.style.display='inline'; Codehighlighter1_934_964_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_934_964_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_934_964_Closed_Text.style.display='none'; Codehighlighter1_934_964_Open_Image.style.display='inline'; Codehighlighter1_934_964_Open_Text.style.display='inline';" src="http://m.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_934_964_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://m.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_934_964_Open_Text><span style="COLOR: #000000">{<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        ans</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">Find(</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">(c[i]</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">d[j]));<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,ans);<br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    <br><img src="http://m.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    <br><img src="http://m.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://m.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span></div> <img src ="http://m.shnenglu.com/sdz/aggbug/124349.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/sdz/" target="_blank">鑻ヤ綑</a> 2010-08-23 08:23 <a href="http://m.shnenglu.com/sdz/archive/2010/08/23/124349.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Push Botton Lock poj 3088鏂壒鐏墊暟http://m.shnenglu.com/sdz/archive/2010/08/21/124202.html鑻ヤ綑鑻ヤ綑Sat, 21 Aug 2010 10:20:00 GMThttp://m.shnenglu.com/sdz/archive/2010/08/21/124202.htmlhttp://m.shnenglu.com/sdz/comments/124202.htmlhttp://m.shnenglu.com/sdz/archive/2010/08/21/124202.html#Feedback0http://m.shnenglu.com/sdz/comments/commentRss/124202.htmlhttp://m.shnenglu.com/sdz/services/trackbacks/124202.html
/*Source CodeProblem: 3088        User: y09shendazhi
Memory: 164K        Time: 0MS
Language: C++        Result: Accepte/

Source Code
*/

#include 
<iostream>
using namespace std;
// /n\
// | |
// \m/
__int64 comb(__int64 m,__int64 n)
{
    
if(n<m)
        
return 0;
    __int64 result
=1;
    m
=m<n-m?m:n-m;
    
for(__int64 i=1;i<=m;i++)
        result
=(result*(n-m+i))/i;    
    
return result;
}

__int64 fun(__int64 n)
{
    __int64 ans
=1;
    
for(__int64 i=1;i<=n;i++)
        ans
*=i;
    
return ans;
}

int main(__int64 argc, char *argv[])
{
    __int64 i,j,k;
    __int64 stir[
15][15]={0};
    
for(i=1;i<12;i++)
    
{
        stir[i][
1]=1;
        
for(j=2;j<i;j++)
        
{
            stir[i][j]
=stir[i-1][j-1]+j*stir[i-1][j];
        }

        stir[i][i]
=1;
    }

    __int64 ans[
12]={0,1};
    
for(i=2;i<12;i++)
    
{
        
        
for(j=1;j<=i;j++)
        
{
            __int64 temp
=0;
            
for(k=1;k<=j;k++)
            
{
                temp
+=stir[j][k]*fun(k);
            }

            ans[i]
+=temp*comb(j,i);
        }

    }

    __int64 
in=0;
    __int64 t
=0;
    scanf(
"%d",&t);
    
for(i=0;i<t;i++)
    
{
        scanf(
"%d",&in);
        printf(
"%I64d %I64d %I64d\n",i+1,in,ans[in]);
    }



    
    
return 0;
}


鑻ヤ綑 2010-08-21 18:20 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
              欧美专区在线| 亚洲精选在线| 久久在线视频在线| 久久精品男女| 久久久欧美精品sm网站| 久久精品国产第一区二区三区最新章节| 久久精品久久综合| 久久久久久久综合色一本| 欧美有码在线视频| 久久久久国产精品午夜一区| 久久久精彩视频| 欧美ab在线视频| 欧美国产成人精品| 亚洲人精品午夜| 最新日韩在线| 午夜精品免费| 欧美ed2k| 国产精品日本欧美一区二区三区| 国产三区二区一区久久| 亚洲国产精品欧美一二99| 亚洲午夜精品久久久久久app| 欧美在线免费观看视频| 欧美.日韩.国产.一区.二区| 亚洲人成网站影音先锋播放| 午夜国产精品视频免费体验区| 久久亚洲国产精品一区二区| 欧美另类综合| 国产真实久久| 夜夜嗨av一区二区三区中文字幕 | 欧美视频你懂的| 国产日韩欧美三区| 日韩视频在线一区| 巨胸喷奶水www久久久免费动漫| 欧美国产专区| 久久精品99国产精品酒店日本| 亚洲图中文字幕| 午夜亚洲激情| 亚洲欧洲综合| 久久久久免费| 国产日本欧美视频| 99国产一区| 欧美成ee人免费视频| 亚洲免费一区二区| 欧美日韩视频在线观看一区二区三区| 黄色日韩网站| 久久久国产一区二区| 在线一区二区三区做爰视频网站| 老司机精品视频一区二区三区| 国产精品久久婷婷六月丁香| 亚洲伦理在线| 亚洲成人在线网| 久久夜色精品亚洲噜噜国产mv| 国产欧美日韩另类一区| 亚洲午夜免费视频| 日韩一区二区电影网| 欧美激情亚洲一区| 亚洲免费观看高清完整版在线观看熊| 欧美不卡在线视频| 欧美高清在线一区| 亚洲欧洲在线一区| 亚洲国产日韩欧美一区二区三区| 久久久亚洲高清| 精品粉嫩aⅴ一区二区三区四区| 久久精品免费看| 欧美在线999| 激情久久五月天| 欧美成人免费观看| 欧美福利电影在线观看| 亚洲免费黄色| 亚洲一区二区三区成人在线视频精品 | 蜜臀久久久99精品久久久久久 | 国产模特精品视频久久久久 | 亚洲经典自拍| 欧美精品偷拍| 亚洲午夜精品网| 亚洲欧美精品suv| 国语自产精品视频在线看| 麻豆精品一区二区综合av| 免费久久99精品国产自| 一本到12不卡视频在线dvd| 99在线热播精品免费99热| 国产精品久久久久永久免费观看 | 亚洲国产成人av在线| 亚洲乱码久久| 久久免费少妇高潮久久精品99| 亚洲一区二区三区在线| 国产视频一区在线| 欧美高清视频免费观看| 欧美人与性动交cc0o| 性久久久久久| 麻豆精品视频在线| 中日韩视频在线观看| 亚洲欧美日韩精品久久久久| 国产亚洲欧美色| 亚洲国产欧美不卡在线观看| 欧美日韩人人澡狠狠躁视频| 欧美在线综合| 欧美国产综合视频| 性欧美video另类hd性玩具| 久久亚洲春色中文字幕久久久| 一二三区精品福利视频| 久久狠狠亚洲综合| 一区二区三区鲁丝不卡| 久久精品91| 亚洲一区二区三区色| 久久亚洲一区二区三区四区| 亚洲午夜电影| 久久夜精品va视频免费观看| 午夜精品亚洲一区二区三区嫩草| 免费亚洲婷婷| 久久久噜噜噜久久人人看| 欧美日韩精品一二三区| 奶水喷射视频一区| 国产日韩精品一区二区三区| 亚洲精品一二区| 亚洲国产另类久久精品| 欧美在线你懂的| 香蕉国产精品偷在线观看不卡| 欧美电影免费网站| 免费观看久久久4p| 国精产品99永久一区一区| 亚洲天堂成人在线观看| 亚洲精品综合精品自拍| 久久九九国产精品| 久久精品国产免费| 国产精品视频网址| 日韩视频在线观看免费| 亚洲精品久久7777| 免费不卡视频| 欧美国产综合一区二区| 在线观看国产精品网站| 久久av资源网站| 久久久亚洲高清| 狠狠88综合久久久久综合网| 欧美一级淫片aaaaaaa视频| 小辣椒精品导航| 国产精品亚洲综合| 亚洲欧美另类在线| 久久精品国产亚洲精品| 国产一区欧美| 久久久精品日韩欧美| 欧美aa在线视频| 日韩视频永久免费观看| 欧美区在线播放| 一本色道久久综合亚洲精品不| 亚洲无吗在线| 国产午夜精品一区二区三区欧美 | 亚洲欧洲三级| 亚洲欧美日韩国产一区二区| 亚洲国产三级在线| 另类欧美日韩国产在线| 欧美激情一区二区三区蜜桃视频 | 亚洲永久在线观看| 欧美专区亚洲专区| 在线欧美小视频| 欧美成人精品1314www| 亚洲人成在线观看| 销魂美女一区二区三区视频在线| 国产女精品视频网站免费| 欧美在线视频全部完| 欧美成人a∨高清免费观看| 亚洲三级观看| 国产精品蜜臀在线观看| 久久久久国产一区二区三区四区| 欧美激情91| 西西人体一区二区| 亚洲国产影院| 国产精品毛片| 美女视频一区免费观看| 9i看片成人免费高清| 久久激情网站| 一区二区日韩免费看| 国产自产精品| 欧美日韩一区二区三区免费| 欧美在线看片a免费观看| 亚洲日本欧美日韩高观看| 欧美专区一区二区三区| 夜夜嗨av一区二区三区| 在线免费观看一区二区三区| 欧美日韩中文字幕精品| 久久久视频精品| 亚洲欧美日本伦理| 亚洲精品中文在线| 欧美波霸影院| 久久久亚洲高清| 午夜亚洲一区| 亚洲网址在线| 夜夜嗨av一区二区三区| 国产日韩av高清| 免费观看日韩av| 一本久久综合亚洲鲁鲁五月天| 欧美一区二区三区男人的天堂| 伊人久久大香线蕉综合热线| 欧美精品一区二区三区四区| 亚洲视频在线观看一区| 久久久久免费观看| 一区二区免费看| 国内精品久久久久久久影视麻豆 | 午夜影视日本亚洲欧洲精品| 日韩网站在线观看|