锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区亚洲二区,欧美在线三区,91久久精品国产91久久性色tvhttp://m.shnenglu.com/y346491470/category/17821.html涓烘ⅵ鎯寵屽鏂楋紒zh-cnTue, 07 Aug 2012 16:51:22 GMTTue, 07 Aug 2012 16:51:22 GMT60hdoj 4050 wolf5x - 鏈熸湜 + dphttp://m.shnenglu.com/y346491470/articles/185087.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesWed, 25 Jul 2012 15:46:00 GMThttp://m.shnenglu.com/y346491470/articles/185087.htmlhttp://m.shnenglu.com/y346491470/comments/185087.htmlhttp://m.shnenglu.com/y346491470/articles/185087.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/185087.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/185087.html璺蟲牸瀛愶紝宸﹀彸鑴氳疆嫻佽煩錛屼笉鑳藉線鍥炶煩錛屾瘡嬈¤煩鏈変釜[A , B]姝ラ暱鑼冨洿銆?/span>姣忎釜鏍煎瓙鍙兘鍑虹幇鍥涚鐘舵侊紝鍙彸鑴氳繘錛屽乏鑴氳繘錛屽弻鑴氳繘錛屼笉鍑嗚繘銆傛瘡縐嶇姸鎬侀兘鏈変竴瀹氭鐜囥傛瘡嬈″彧鑳借煩鍒版渶榪戝彲琛岀殑鏍煎瓙銆傚綋璺沖嚭浜唍涓牸瀛愭垨鑰呬笉鑳藉姩鏃舵湡鏈涙鏁般?br />
銆愰瑙c戯細鏈熸湜綾婚鐩紝鏃犵幆錛岀洿鎺p銆?br />              鍒╃敤鍏ㄦ湡鏈涘叕寮忥紝娉ㄦ剰鐘舵佹灇涓炬椂瑕佷箻涓婃潯浠舵鐜囥傜劧鍚庢寜甯歌鏈熸湜鍋氭硶鍗沖彲錛屽掔潃鎺ㄣ傜瓟妗堜負dp[0][3]銆?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 #include "iomanip"
12 #include "set"
13 #include "utility"
14 using namespace std;
15 typedef pair<intint> pii;
16 #define pb push_back
17 #define mp make_pair
18 #define fi first
19 #define se second
20 #define sof(x) sizeof(x)
21 #define lc(x) (x << 1)
22 #define rc(x) (x << 1 | 1)
23 #define lowbit(x) (x & (-x))
24 #define ll long long
25 
26 double dp[4010][4];
27 double p[4010][4];
28 int n, a, b;
29 int main() {
30     int T;
31     scanf("%d", &T);
32     while(T--) {
33         scanf("%d%d%d", &n, &a, &b);
34         memset(p, 0, sizeof(p));
35         memset(dp, 0, sizeof(dp));
36         for(int i = 1; i <= n; i++)
37             scanf("%lf%lf%lf%lf", &p[i][0], &p[i][1], &p[i][2], &p[i][3]);
38         for(int i = n + 1; i <= n + a; i++) p[i][3] = 1.0;
39         double c = 1.0;
40         for(int i = n; i >= 0; i--) {
41             for(int j = 1; j < 4; j++) {
42                 double pp = 1.0;
43                 for(int k = a; k <= b; k++) {
44                     if(j == 1) {
45                         dp[i][1] += pp * ((dp[i+k][2] + c) * p[i+k][2] + (dp[i+k][3] + c) * p[i+k][3]);
46                         pp *= (p[i+k][0] + p[i+k][1]);
47                     } else if(j == 2) {
48                         dp[i][2] += pp * ((dp[i+k][1] + c) * p[i+k][1] + (dp[i+k][3] + c) * p[i+k][3]);
49                         pp *= (p[i+k][0] + p[i+k][2]);
50                     } else if(j == 3) {
51                         dp[i][3] += pp * ((dp[i+k][1] + c) * p[i+k][1] + (dp[i+k][2] + c) * p[i+k][2] + (dp[i+k][3] + c) * p[i+k][3]);
52                         pp *= (p[i+k][0]);
53                     }
54                 }
55             }
56         }
57         printf("%.6f\n", dp[0][3]);
58     }
59     return 0;
60 }
61 


y @ The Angry Teletubbies 2012-07-25 23:46 鍙戣〃璇勮
]]>
hdoj 4219 Randomization - 鏍?wèi)dp + 姒傜巼http://m.shnenglu.com/y346491470/articles/184744.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesMon, 23 Jul 2012 08:23:00 GMThttp://m.shnenglu.com/y346491470/articles/184744.htmlhttp://m.shnenglu.com/y346491470/comments/184744.htmlhttp://m.shnenglu.com/y346491470/articles/184744.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/184744.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/184744.html緇欏畾涓媯墊爲(wèi)錛岀粰瀹氳竟鏉冪殑鍖洪棿[0,L]錛屾眰鏈緇堟爲(wèi)鐨勬渶闀胯礬<=S鐨勬鐜囷紱 

銆愰瑙c戯細姝﹀ぇ鏍¤禌鐨勬爲(wèi)dp錛屾斁浜嗗ソ涔咃紝鐪嬬潃棰樿В鍕夊己榪囦簡銆傚彧鍙互璇存垜鐨勬爲(wèi)dp澶按浜嗭紝榪樺仠鐣欏湪鑳屽寘鐨勯樁孌點?br />              璁劇姸鎬乨p[i][j]琛ㄧず浠涓烘牴鐨勫瓙鏍?wèi)锛屽叾鍙跺瓙缁撶偣鍒癷鐨勬渶闀胯窛紱諱負j涓旇瀛愭爲(wèi)鏈闀胯礬寰勪笉瓚呰繃s鐨勬鐜囥?br />              瀵逛簬u鐨勪竴涓瓙鏍?wèi)v錛屽厛鏋氫婦u榪瀡鐨勯暱搴︼紝鐒跺悗鍐嶆妸涔嬪墠鐨勫瓙鏍?wèi)鍜寁榪欐潯閾懼悎騫訛紝濂藉鏉傦紝涓嶄細琛ㄨ揪浜嗭紝鐩存帴鐮旂┒浠g爜鍚с?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 #include "iomanip"
12 using namespace std;
13 #define pb push_back
14 #define mp make_pair
15 #define fi first
16 #define se second
17 #define lc(x) (x << 1)
18 #define rc(x) (x << 1 | 1)
19 #define lowbit(x) (x & (-x))
20 #define ll long long
21 #define maxn 70
22 #define maxs 530
23 int n, l, s;
24 double dp[maxn][maxs];
25 double son[maxs], tmp[maxs];
26 double e;
27 vector<int> vec[maxn];
28 void dfs(int u, int fa) {
29     memset(dp[u], 0, sizeof(dp[u]));
30     dp[u][0] = 1.0;
31     int size = vec[u].size();
32     for(int i = 0; i < size; i++) {
33         int v = vec[u][i];
34         if(v == fa) continue;
35         dfs(v, u);
36         memset(son, 0, sizeof(son));
37         memset(tmp, 0, sizeof(tmp));
38         for(int j = 0; j <= l; j++)
39             for(int k = 0; k <= s; k++)
40                 if(j + k <= s)
41                     son[j+k] += e * dp[v][k];
42         for(int j = 0; j <= s; j++)
43             for(int k = 0; k <= s - j; k++)
44                 tmp[max(j, k)] += son[j] * dp[u][k];
45         for(int j = 0; j <= s; j++)
46             dp[u][j] = tmp[j];
47     }
48 }
49 
50 int main() {
51     int T, Case = 1;
52     scanf("%d", &T);
53     while(T--) {
54         scanf("%d%d%d", &n, &l, &s);
55         for(int i = 0; i <= n; i++) vec[i].clear();
56         e = 1.0 / (1.0 + l);
57         for(int i = 1; i < n; i++) {
58             int a, b;
59             scanf("%d%d", &a, &b);
60             vec[a].pb(b);
61             vec[b].pb(a);
62         }
63         dfs(1, -1);
64         double ans = 0.0;
65         for(int i = 0; i <= s; i++) ans += dp[1][i];
66         printf("Case %d: %.6f\n", Case++, ans);
67     }
68     return 0;
69 }
70 


y @ The Angry Teletubbies 2012-07-23 16:23 鍙戣〃璇勮
]]>
zoj 3582 Back to the Past - 鏈熸湜 + dphttp://m.shnenglu.com/y346491470/articles/171996.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesThu, 19 Apr 2012 08:20:00 GMThttp://m.shnenglu.com/y346491470/articles/171996.htmlhttp://m.shnenglu.com/y346491470/comments/171996.htmlhttp://m.shnenglu.com/y346491470/articles/171996.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/171996.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/171996.html
銆愰瑙c戯細璁綿p[i][j]琛ㄧず宸﹁竟鏈塱涓礊浜紝鍙寵竟鏈塲涓礊浜鐩爣鐘舵佺殑鏈熸湜銆?br />               鐒跺悗鎵鏈塪p[ii][jj](ii >= i && jj >= j)閮芥槸dp[i][j]鐨勫悗緇х姸鎬侊紝鐢辨湡鏈涜綆楀叕寮忓彲浠ョ畻鍑篸p[i][j]鐨勬湡鏈涖?br />               榪欓噷杞Щ浼氭湁涓幆錛岀Щ欏瑰嵆鍙鐞嗘帀銆?br />               瑕佸厛棰勫鐞嗙粍鍚堟暟銆乸鐨勫箓鍜?1-p)鐨勫箓銆?br />               鏈鍚庣瓟妗堝嵆涓篸p[0][0].
               鐢ㄨ蹇嗗寲鎼滅儲鏉ュ啓闈炲父鏂逛究銆?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 #include "iomanip"
12 using namespace std;
13 #define pb push_back
14 #define mp make_pair
15 #define fi first
16 #define se second
17 #define lc(x) (x << 1)
18 #define rc(x) (x << 1 | 1)
19 #define lowbit(x) (x & (-x))
20 #define ll long long
21 #define maxn 110
22 double dp[55][55];
23 double p1[maxn], p2[maxn];
24 double C[55][55];
25 int n, m;
26 double p;
27 bool visit[55][55];
28 void init() {
29     for(int i = 0; i < 51; i++) C[i][0] = C[i][i] = 1;
30     for(int i = 2; i < 51; i++)
31         for(int j = 1; j < i; j++)
32             C[i][j] = C[i-1][j-1] + C[i-1][j];
33 }
34 
35 double dfs(int a, int b) {
36     double &tmp = dp[a][b];
37     if(visit[a][b]) return tmp;
38     visit[a][b] = true;
39     if(a >= m && b >= m) return tmp = 0.0;
40     tmp = 1.0;
41     for(int i = 0; i <= n - a; i++) {
42         for(int j = 0; j <= n - b; j++) {
43             if(i == 0 && j == 0) continue;
44             tmp += (dfs(a + i, b + j)) * p1[i+j] * p2[2 * n - a - b - i - j] * C[n-a][i] * C[n-b][j];
45         }
46     }
47     return tmp /= (1 - p2[2 * n - a - b]);
48 }
49 
50 int main() {
51     init();
52     while(~scanf("%d%d%lf", &n, &m, &p)) {
53         if(!n && !m) break;
54         p1[0] = p2[0] = 1.0;
55         for(int i = 1; i < maxn; i++) p1[i] = p1[i-1] * p;
56         for(int i = 1; i < maxn; i++) p2[i] = p2[i-1] * (1 - p);
57         memset(visit, falsesizeof(visit));
58         printf("%.6f\n", dfs(0, 0));
59     }
60     return 0;
61 }
62 


y @ The Angry Teletubbies 2012-04-19 16:20 鍙戣〃璇勮
]]>
uva 5811 Cards - 鏈熸湜 + dphttp://m.shnenglu.com/y346491470/articles/171977.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesThu, 19 Apr 2012 06:25:00 GMThttp://m.shnenglu.com/y346491470/articles/171977.htmlhttp://m.shnenglu.com/y346491470/comments/171977.htmlhttp://m.shnenglu.com/y346491470/articles/171977.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/171977.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/171977.html
銆愰瑙c戯細鏈熸湜dp錛屽鏋滀笉鑰冭檻joker灝卞彉寰楅潪甯哥畝鍗曘備絾鐜板湪joker鍙互鍙樻垚浠繪剰鑺辮壊錛屾墍浠ュ鏋滃綋鍓嶇炕鍒癹oker闇瑕佹灇涓捐繖涓猨oker鍙樻垚浠涔堣姳鑹詫紝鍙栨渶灝忕殑鏈熸湜鍗沖彲銆?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 #include "iomanip"
12 using namespace std;
13 #define pb push_back
14 #define mp make_pair
15 #define fi first
16 #define se second
17 #define lc(x) (x << 1)
18 #define rc(x) (x << 1 | 1)
19 #define lowbit(x) (x & (-x))
20 #define ll long long
21 int aa, bb, cc, dd;
22 double dp[16][16][16][16][5][5];
23 bool visit[16][16][16][16][5][5];
24 
25 double dfs(int a, int b, int c, int d, int big, int small) {
26     double &tmp = dp[a][b][c][d][big][small];
27     if(visit[a][b][c][d][big][small]) return tmp;
28     visit[a][b][c][d][big][small] = true;
29     int now[] = {a, b, c, d};
30     if(big != 4) now[big]++;
31     if(small != 4) now[small]++;
32     if(now[0] >= aa && now[1] >= bb && now[2] >= cc && now[3] >= dd) return tmp = 0.0;
33     tmp = 1.0;
34     double sum = now[0] + now[1] + now[2] + now[3];
35     if(a < 13) tmp += dfs(a + 1, b, c, d, big, small) * (13.0 - a) / (54.0 - sum);
36     if(b < 13) tmp += dfs(a, b + 1, c, d, big, small) * (13.0 - b) / (54.0 - sum);
37     if(c < 13) tmp += dfs(a, b, c + 1, d, big, small) * (13.0 - c) / (54.0 - sum);
38     if(d < 13) tmp += dfs(a, b, c, d + 1, big, small) * (13.0 - d) / (54.0 - sum);
39     if(big == 4) {
40         double tmp1 = 1e100;
41         tmp1 = min(tmp1, dfs(a, b, c, d, 0, small) / (54.0 - sum));
42         tmp1 = min(tmp1, dfs(a, b, c, d, 1, small) / (54.0 - sum));
43         tmp1 = min(tmp1, dfs(a, b, c, d, 2, small) / (54.0 - sum));
44         tmp1 = min(tmp1, dfs(a, b, c, d, 3, small) / (54.0 - sum));
45         tmp += tmp1;
46     }
47     if(small == 4) {
48         double tmp1 = 1e100;
49         tmp1 = min(tmp1, dfs(a, b, c, d, big, 0) / (54.0 - sum));
50         tmp1 = min(tmp1, dfs(a, b, c, d, big, 1) / (54.0 - sum));
51         tmp1 = min(tmp1, dfs(a, b, c, d, big, 2) / (54.0 - sum));
52         tmp1 = min(tmp1, dfs(a, b, c, d, big, 3) / (54.0 - sum));
53         tmp += tmp1;
54     }
55     return tmp;
56 }
57 
58 int main() {
59     int T, Case = 1;
60     cin >> T;
61     while(T--) {
62         cin >> aa >> bb >> cc >> dd;
63         int cnt = 0;
64         cnt += max(aa - 13, 0);
65         cnt += max(bb - 13, 0);
66         cnt += max(cc - 13, 0);
67         cnt += max(dd - 13, 0);
68         printf("Case %d: ", Case++);
69         if(cnt > 2) printf("-1.000\n");
70         else {
71             memset(visit, falsesizeof(visit));
72             printf("%.3f\n", dfs(0, 0, 0, 0, 4, 4));
73         }
74     }
75     return 0;
76 }
77 


y @ The Angry Teletubbies 2012-04-19 14:25 鍙戣〃璇勮
]]>
poj 2635 The Embarrassed Cryptographer - 綰挎х瓫绱犳暟 + 鍒嗗壊鏁板瓧姹傛āhttp://m.shnenglu.com/y346491470/articles/168388.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesTue, 20 Mar 2012 05:50:00 GMThttp://m.shnenglu.com/y346491470/articles/168388.htmlhttp://m.shnenglu.com/y346491470/comments/168388.htmlhttp://m.shnenglu.com/y346491470/articles/168388.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/168388.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/168388.html100)鍜孡(L<=106)錛岄棶k鐨勬渶灝忚川鍥犳暟鏄惁灝忎簬L銆?br />
銆愰瑙c戯細鏄劇劧鎴戜滑鍙叧蹇冭川鍥犳暟錛屾墍浠ュ厛瀵筁姹傚嚭瀹冪殑鎵鏈夎川鍥犳暟銆?br />               鐒跺悗灝辨槸鍒ゆ柇榪欎簺璐ㄥ洜鏁版槸鍚﹁兘澶熸暣闄錛屽鏋滅敤鍗佽繘鍒墮珮綺懼害鍘繪眰妯′細TLE銆?br />               鑰冭檻鍒拌繘鍒惰秺澶э紝榪愮畻鐨勬鏁板氨瓚婂皯銆傚洜姝ゆ垜浠彲浠ユ洿楂樼殑榪涘埗銆?br />               鎴戞祴璇曚簡涓ょ榪涘埗錛?000榪涘埗鏃?00+MS錛?0000000000榪涘埗鏃?00+MS銆?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 #include "iomanip"
12 using namespace std;
13 #define pb push_back
14 #define mp make_pair
15 #define fi first
16 #define se second
17 #define lc(x) (x << 1)
18 #define rc(x) (x << 1 | 1)
19 #define lowbit(x) (x & (-x))
20 #define ll long long
21 #define maxn 110
22 #define maxl 1000050
23 char s[maxn];
24 int l, cnt;
25 int prime[100000], pn;
26 ll val[maxn];
27 
28 void getprime() {
29     bool isprime[maxl];
30     memset(isprime, truesizeof(isprime));
31     pn = 0;
32     for(ll i = 2; i < maxl; i++) {
33         if(isprime[i]) {
34             prime[pn++] = i;
35             for(ll j = i * i; j < maxl; j += i) isprime[j] = false;
36         }
37     }
38 }
39 
40 void work() {
41     int len = strlen(s);
42     ll res = 0;
43     cnt = 0;
44     for(int i = 0; i < len % 10; i++) {
45         res *= 10;
46         res += s[i] - '0';
47     }
48     val[cnt++] = res;
49     for(int i = len % 10; i < len; i += 10) {
50         res = 0;
51         for(int j = i; j < i + 10; j++) {
52             res *= 10;
53             res += s[j] - '0';
54         }
55         val[cnt++] = res;
56     }
57 }
58 
59 int main() {
60     getprime();
61     while(~scanf("%s%d", s, &l)) {
62         if(s[0] == '0' && l == 0) break;
63         work();
64         bool flag = true;
65         int len = (strlen(s) + 9) / 10;
66         for(int i = 0; i < pn && prime[i] < l; i++) {
67             ll res = 0;
68             for(int j = 0; j < cnt; j++) {
69                 res = res * 10000000000LL + val[j];
70                 res %= prime[i];
71             }
72             if(res == 0) {
73                 printf("BAD %d\n", prime[i]);
74                 flag = false;
75                 break;
76             }
77         }
78         if(flag) printf("GOOD\n");
79     }
80     return 0;
81 }
82 


y @ The Angry Teletubbies 2012-03-20 13:50 鍙戣〃璇勮
]]>
poj 2689 Prime Distance - 綰挎х瓫绱犳暟 + 姹傚ぇ鍖洪棿绱犳暟http://m.shnenglu.com/y346491470/articles/166591.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesSun, 26 Feb 2012 15:48:00 GMThttp://m.shnenglu.com/y346491470/articles/166591.htmlhttp://m.shnenglu.com/y346491470/comments/166591.htmlhttp://m.shnenglu.com/y346491470/articles/166591.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/166591.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/166591.html2,147,483,647)

銆愰瑙c戯細榪欓濂界粡鍏革紝褰撳勾鏂扮敓璧涗篃鍑轟簡榪欓錛屼笉榪囧仛涓嶅嚭錛岀洿鍒頒粖澶╃粓浜庣粰鎴戝仛鍑烘潵浜嗐?br />               榪欓闇瑕佺煡閬撲竴涓畾鐞嗭紝灝辨槸瀵逛簬姣忎竴涓悎鏁癮錛屽叾蹇呭畾瀛樺湪灝忎簬絳変簬鏍瑰彿a鐨勮川鍥犲瓙銆?br />               鎵浠ュ浜庝竴涓暟a鎴戜滑鍙渶瑕佹鏌ヤ粬鏈夋病鏈夊皬浜庣瓑浜庢牴鍙穉鐨勮川鍥犲瓙鍗沖彲銆?br />               鑰冭檻鍒版牴鍙?,147,483,647澶х害鏄?7000錛屾墍浠ユ垜浠厛絳涢夊嚭47000浠ュ唴鐨勭礌鏁幫紝澶х害5000涓?br />               鐒跺悗鍐嶇敤榪?000涓礌鏁板幓絳涢夌粰瀹氬尯闂村唴鐨勭礌鏁般?br />               鏈鍚庢灇涓句竴嬈℃眰絳旀鍗沖彲銆?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 #include "iomanip"
12 using namespace std;
13 #define pb push_back
14 #define lc(x) (x << 1)
15 #define rc(x) (x << 1 | 1)
16 #define lowbit(x) (x & (-x))
17 #define ll long long
18 #define MAX 1000050
19 ll prime[5500], rec[MAX];
20 int tot, cnt;
21 bool isprime[MAX];
22 ll l, r;
23 void init() {
24     tot = 0;
25     memset(isprime, truesizeof(isprime));
26     prime[tot++] = 2;
27     for(int i = 3; i < 50000; i += 2) {
28         if(isprime[i]) {
29             prime[tot++] = i;
30             if(i * i < 50000) {
31                 for(int j = i + i; j < 50000; j += i) isprime[j] = false;
32             }
33         } 
34     }
35 }
36 
37 int main() {
38     init();
39     while(~scanf("%lld%lld", &l, &r)) {
40         if(l < 2) l = 2;
41         cnt = 0;
42         memset(isprime, truesizeof(isprime));
43         for(int i = 0; i < tot && prime[i] * prime[i] <= r; i++) {
44             ll tmp = l / prime[i] * prime[i];
45             if(tmp < l) tmp += prime[i];
46             if(tmp == prime[i]) tmp += prime[i];
47             for(ll j = tmp; j <= r; j += prime[i]) isprime[j-l] = false;
48         }
49         for(int i = 0; i <= r - l; i++) 
50             if(isprime[i]) rec[cnt++] = i + l;
51 
52         if(cnt < 2) printf("There are no adjacent primes.\n");
53         else {
54             int idx1 = 1, idx2 = 1;
55             for(int i = 1; i < cnt; i++) {
56                 if(rec[i] - rec[i-1] < rec[idx1] - rec[idx1-1]) idx1 = i;
57                 if(rec[i] - rec[i-1] > rec[idx2] - rec[idx2-1]) idx2 = i;
58             }
59             printf("%lld,%lld are closest, %lld,%lld are most distant.\n", rec[idx1-1], rec[idx1], rec[idx2-1], rec[idx2]);
60         }
61     }
62     return 0;
63 }
64 


y @ The Angry Teletubbies 2012-02-26 23:48 鍙戣〃璇勮
]]>
hdoj 3944 DP錛?- 姹傚ぇ緇勫悎鏁?+ Lucas瀹氱悊http://m.shnenglu.com/y346491470/articles/164856.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesThu, 02 Feb 2012 14:42:00 GMThttp://m.shnenglu.com/y346491470/articles/164856.htmlhttp://m.shnenglu.com/y346491470/comments/164856.htmlhttp://m.shnenglu.com/y346491470/articles/164856.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/164856.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/164856.html
銆愰瑙c戯細涓寮濮嬩互涓烘槸涓猟p錛屽彂鐜皀,k閮藉緢澶э紝鑲畾鏄暟瀛﹂浜嗐?br />               寰堝鏄撳彂鐜版潹杈変笁瑙掑叿鏈夊縐版э紝鎵浠ユ垜浠彧闇瑕佺爺絀秌 <= n / 2鐨勬儏鍐點?br />               鍒╃敤璐績鎬濇兂錛屾瘡嬈¢兘寰宸︿笂鏂硅漿縐葷洿鍒板幓鍒扮0鍒楋紝鐒跺悗鏈鍚庡叏閮ㄥ線涓婅漿縐葷洿鍒版渶涓婃柟銆?br />               瀹規(guī)槗寰楀嚭鍏紡錛?br />                     ans = C(n, k) + C(n-1, k-1) + …… + C(n-k+1, 1) + C(n-k, 0) + n - k
                           鎶?C(n-k, 0) 鎹㈡垚 C(n-k+1, 0)錛岀敱鍏紡 C(n, k) = C(n-1, k) + C(n-1, k-1) 鍙互榪涜鍖栫畝
               鍖栫畝鍚庡緱錛?br />                     ans = C(n+1, k) + n - k

                     鎺ㄥ嚭絳旀鎴戝緢寮蹇冿紝浠ヤ負鎺ヤ笅鏉ュ氨娌′簡錛屽彲鏄垜鍙戠幇n寰堝ぇ錛屾櫘閫氭眰緇勫悎鏁頒細TLE錛岄間簬鏃犲錛屾垜鎼滀簡涓涓嬶紝鍙戠幇浜哃ucas瀹氱悊銆?br />                     鑷充簬浠涔堟槸Lucas瀹氱悊錛屽ぇ瀹惰嚜宸辯櫨搴﹀惂銆?br />                     鐢ㄤ簡瀹氱悊鍒氬紑濮嬭繕鏄疶LE錛屽洜涓篶ase楂樿揪10W錛岃繕瑕佹墦琛ㄨ涓嬫ā姣忎釜绱犳暟鐨勯樁涔橈紝鏈鍚庣粓浜庤繃浜嗐?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 #include "queue"
 7 #include "cmath"
 8 #include "string"
 9 #include "cctype"
10 #include "map"
11 using namespace std;
12 #define pb push_back
13 #define lc(x) (x << 1)
14 #define rc(x) (x << 1 | 1)
15 #define lowbit(x) (x & (-x))
16 #define ll long long
17 #define maxp 10050
18 ll n, k, p;
19 ll fac[maxp][1500];
20 int prime[maxp], hash[maxp];
21 bool visit[maxp];
22 
23 void init() {
24     memset(visit, falsesizeof(visit));
25     int tot = 0;
26     prime[tot] = 2, hash[2] = tot, tot++;
27     for(int i = 3; i < maxp; i += 2) {
28         if(!visit[i]) {
29             prime[tot] = i, hash[i] = tot, tot++;
30             if(i * i < maxp)
31                 for(int j = 2 * i; j < maxp; j += i) visit[j] = true;
32         }
33     }
34     for(int i = 0; i < tot; i++) {
35         fac[0][i] = 1;
36         for(int j = 1; j < maxp; j++) {
37             fac[j][i] = (fac[j-1][i] * j) % prime[i];
38         }
39     }
40 }
41 
42 ll quickpower(ll x, ll n) {
43     ll res = 1;
44     x %= p;
45     while(n) {
46         if(n & 1) res = res * x % p;
47         x = x * x % p;
48         n >>= 1;
49     }
50     return res;
51 }
52 
53 ll C(ll n, ll k, ll p) {
54     ll res = 1;
55     if(k > n) return 0;
56     res = fac[n][hash[p]] * quickpower(fac[n-k][hash[p]] * fac[k][hash[p]], p - 2) % p;
57     return res;
58 }
59 
60 ll Lucas(ll n, ll k, ll p) {
61     if(k == 0) return 1;
62     return C(n % p, k % p, p) * Lucas(n / p, k / p, p) % p;
63 }
64 
65 int main() {
66     int Case = 1;
67     init();
68     while(~scanf("%lld%lld%lld", &n, &k, &p)) {
69         if(k > n / 2) k = n - k;
70         ll ans = (Lucas(n+1, k, p) + n - k) % p;
71         printf("Case #%d: %lld\n", Case++, ans);
72     }
73     return 0;
74 }
75 


y @ The Angry Teletubbies 2012-02-02 22:42 鍙戣〃璇勮
]]>
hdoj 2243 鑰冪爺璺尗鑼斺斿崟璇嶆儏緇?- ac鑷姩鏈?+ 鐭╅樀蹇熷箓 + 蹇熷箓 + 浜屽垎http://m.shnenglu.com/y346491470/articles/158561.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesMon, 17 Oct 2011 09:24:00 GMThttp://m.shnenglu.com/y346491470/articles/158561.htmlhttp://m.shnenglu.com/y346491470/comments/158561.htmlhttp://m.shnenglu.com/y346491470/articles/158561.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/158561.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/158561.html闃呰鍏ㄦ枃

y @ The Angry Teletubbies 2011-10-17 17:24 鍙戣〃璇勮
]]>
poj 2778 DNA Sequence - ac鑷姩鏈?+ 鐭╅樀蹇熷箓 + 杞寲涓烘眰L姝ラ暱鐨勬柟妗堟暟http://m.shnenglu.com/y346491470/articles/158559.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesMon, 17 Oct 2011 09:04:00 GMThttp://m.shnenglu.com/y346491470/articles/158559.htmlhttp://m.shnenglu.com/y346491470/comments/158559.htmlhttp://m.shnenglu.com/y346491470/articles/158559.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/158559.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/158559.html
銆愰瑙c戯細鐢╝c鑷姩鏈烘瀯閫犱竴涓狣FA錛堟棦鏈夌‘瀹氭х殑鐘舵佽漿縐誨浘錛夛紝鐒跺悗鐢ㄧ煩闃靛揩閫熷箓姹傝В銆?br />
銆愪唬鐮併戯細
  1 #include "iostream"
  2 #include "cstdio"
  3 #include "cstring"
  4 using namespace std;
  5 #define ll long long
  6 const ll MOD = 100000;
  7 const int kind = 4;
  8 const int maxn = 500;
  9 #define MAX 105
 10 int root, tot;
 11 int n, m;
 12 int que[maxn], head, tail;
 13 bool visit[maxn];
 14 struct Node {
 15     int child[kind];
 16     int fail;
 17     int end;
 18     void init() {
 19         memset(child, 0sizeof(child));
 20         fail = -1, end = 0;
 21     }
 22 } T[maxn];
 23 
 24 void init() {
 25     root = tot = 0;
 26     T[root].init();
 27 }
 28 
 29 int hash(char ch) {
 30     if(ch == 'A'return 0;
 31     else if(ch == 'C'return 1;
 32     else if(ch == 'G'return 2;
 33     else return 3;
 34 }
 35 
 36 void insert(char *s) {//鎻掑叆鍗曡瘝
 37     int p = root, index;
 38     while (*s) {
 39         index = hash(*s);
 40         if (!T[p].child[index]) {
 41             T[++tot].init();
 42             T[p].child[index] = tot;
 43         }
 44         p = T[p].child[index];
 45         s++;
 46     }
 47     T[p].end = 1;
 48 }
 49 
 50 void build_ac_auto() {
 51     head = tail = 0;
 52     que[tail++= root;
 53     while (head < tail) {
 54         int u = que[head++];
 55         for (int i = 0; i < kind; i++) {
 56             if (T[u].child[i]) {
 57                 int son = T[u].child[i];
 58                 int p = T[u].fail;
 59                 if (u == root) T[son].fail = root;
 60                 else {
 61                     T[son].fail = T[p].child[i];
 62                     T[son].end |= T[T[son].fail].end;
 63                 }
 64                 que[tail++= son;
 65             } else {//trie鍥撅紝璁懼畾铏氭嫙鑺傜偣
 66                 int p = T[u].fail;
 67                 if (u == root) T[u].child[i] = root;
 68                 else T[u].child[i] = T[p].child[i];
 69             }
 70         }
 71     }
 72 }
 73 
 74 struct Mat {
 75     ll val[MAX][MAX];
 76     void unit() {
 77         zero();
 78         for(int i = 0; i < MAX; i++) val[i][i] = 1;
 79     }
 80     void zero() {
 81         memset(val, 0sizeof(val));
 82     }
 83 }x;
 84 
 85 Mat operator *(const Mat &a, const Mat &b) {
 86     Mat tmp;
 87     tmp.zero();
 88     for(int k = 0; k <= tot; k++) {
 89         for(int i = 0; i <= tot; i++) {
 90             if(a.val[i][k])
 91                 for(int j = 0; j <= tot; j++) {
 92                     tmp.val[i][j] += a.val[i][k] * b.val[k][j];
 93                     if(tmp.val[i][j] >= MOD) tmp.val[i][j] %= MOD;
 94                 }
 95         }
 96     }
 97     return tmp;
 98 }
 99 
100 Mat operator ^(Mat x, int n) {
101     Mat tmp;
102     tmp.unit();
103     while(n) {
104         if(n & 1) tmp = tmp * x;
105         x = x * x;
106         n >>= 1;
107     }
108     return tmp;
109 }
110 
111 void dfs(int u) {
112     visit[u] = true;
113     for(int i = 0; i < kind; i++) {
114         int v = T[u].child[i];
115         if(!T[v].end) {
116             x.val[u][v]++;
117             if(!visit[v]) dfs(v);
118         }
119     }
120 }
121 
122 int main() {
123     char s[15];
124     while(~scanf("%d%d"&m, &n)) {
125         init();
126         for(int i = 0; i < m; i++) {
127             scanf("%s", s);
128             insert(s);
129         }
130         build_ac_auto();
131         x.zero();
132         memset(visit, falsesizeof(visit));
133         dfs(root);
134         Mat ans = x ^ n;
135         ll res = 0;
136         for(int i = 0; i <= tot; i++)
137             res += ans.val[0][i];
138         printf("%lld\n", res % MOD);
139     }
140     return 0;
141 }




y @ The Angry Teletubbies 2011-10-17 17:04 鍙戣〃璇勮
]]>
zoj 2671 Cryptography - 鐭╅樀涔樻硶 + 綰挎鏍?wèi)鏌ヨ鎬濇兂http://m.shnenglu.com/y346491470/articles/157455.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesMon, 03 Oct 2011 17:31:00 GMThttp://m.shnenglu.com/y346491470/articles/157455.htmlhttp://m.shnenglu.com/y346491470/comments/157455.htmlhttp://m.shnenglu.com/y346491470/articles/157455.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/157455.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/157455.htmlPi,j=Ai × Ai+1 × ... × Aj 銆?br />
銆愰瑙c戯細鏅氱殑鐭╅樀涔樻硶錛岃瀵熷埌1<=n,m<=30,000錛屽鏋滅敤鏈寸礌鐨勬柟娉曟椂闂村鏉傚害楂樿揪O(nm)錛屾樉鐒舵槸涓嶅彲浠ユ帴鍙楃殑銆?br />              榪欓噷鍙互鐢ㄧ嚎孌墊爲(wèi)鐨勬煡璇㈡濇兂錛屾妸涓棿鏈夌敤鐨勫間繚瀛樹笅鏉ワ紝浠ュ悗灝卞彲浠ョ敤O(1)鐨勫緱鍒般?br />
銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 using namespace std;
 5 #define maxn 32768
 6 int r, n, m;
 7 struct Mat {
 8     int val[2][2];
 9     void zero() {
10         memset(val, 0sizeof(val));
11     }
12 }x[(maxn<<1)+1];
13 
14 int LC(int i) {return i << 1;}
15 int RC(int i) {return LC(i)^1;}
16 
17 Mat operator *(const Mat &a, const Mat &b) {
18     Mat tmp;
19     tmp.zero();
20     for(int k = 0; k < 2; k++) {
21         for(int i = 0; i < 2; i++) {
22             if(a.val[i][k]) {
23                 for(int j = 0; j < 2; j++) {
24                     tmp.val[i][j] += a.val[i][k] * b.val[k][j];
25                     if(tmp.val[i][j] >= r) tmp.val[i][j] %= r;
26                 }
27             }
28         }
29     }
30     return tmp;
31 }
32 
33 Mat query(int p, int left, int right, int l, int r) {//綰挎鏍?wèi)鐨勬煡璇㈡濇兂
34     if(left == l && right == r) return x[p];
35     int mid = (left + right) >> 1;
36     if(r <= mid) return query(LC(p), left, mid, l, r);
37     else if(l > mid) return query(RC(p), mid + 1, right, l, r);
38     else return query(LC(p), left, mid, l, mid) * query(RC(p), mid + 1, right, mid + 1, r);
39 }
40 
41 int main() {
42     bool flag = false;
43     while(~scanf("%d%d%d"&r, &n, &m)) {
44         int st = 1;
45         while(st < n) st <<= 1;
46         for(int i = 0; i < n; i++
47             for(int j = 0; j < 2; j++)
48                 for(int k = 0; k < 2; k++)
49                     scanf("%d"&x[st+i].val[j][k]);
50         for(int i = st - 1; i; i--) x[i] = x[LC(i)] * x[RC(i)];
51         while(m--) {
52             if(flag) printf("\n");
53             else flag = true;
54             int le, ri;
55             scanf("%d%d"&le, &ri);
56             Mat ans = query(11, st, le, ri);
57             printf("%d %d\n%d %d\n", ans.val[0][0], ans.val[0][1], ans.val[1][0], ans.val[1][1]);
58         }
59     }
60     return 0;
61 }



y @ The Angry Teletubbies 2011-10-04 01:31 鍙戣〃璇勮
]]>
poj 3735 Training little cats - 鐭╅樀蹇熷箓http://m.shnenglu.com/y346491470/articles/157284.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesSat, 01 Oct 2011 04:00:00 GMThttp://m.shnenglu.com/y346491470/articles/157284.htmlhttp://m.shnenglu.com/y346491470/comments/157284.htmlhttp://m.shnenglu.com/y346491470/articles/157284.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/157284.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/157284.html               1. g i 緇檌鍙尗鍜竴棰楄姳鐢熺背
               2. e i 璁╃i鍙尗鍜悆鎺夊畠鎷ユ湁鐨勬墍鏈夎姳鐢熺背
               3. s i j 灝嗙尗鍜猧涓庣尗鍜猨鐨勬嫢鏈夌殑鑺辯敓綾充氦鎹?

               鐜板皢涓婅堪涓緇勬搷浣滃仛m嬈″悗錛岄棶姣忓彧鐚挭鏈夊灝戦鑺辯敓錛?/p>
銆愰瑙c戯細m杈懼埌10^9錛屾樉鐒朵笉鑳界洿鎺ョ畻銆?br />              鍥犱負k涓搷浣滅粰鍑轟箣鍚庡氨鏄浐瀹氱殑錛屾墍浠ユ兂鍒扮敤鐭╅樀錛岀煩闃靛揩閫熷箓鍙互鎶婃椂闂村鏉傚害闄嶅埌O錛坙ogm錛夈傞棶棰樿漿鍖栦負濡備綍鏋勯犺漿緗煩闃碉紵
              璇翠笅鎴戠殑鎬濊礬錛岃瀵熶互涓婁笁縐嶆搷浣滐紝鍙戠幇絎簩錛屼笁縐嶆搷浣滄瘮杈冨鏄撳鐞嗭紝閲嶇偣钀藉湪絎竴縐嶆搷浣滀笂銆?br />              鏈変竴涓緢濂界殑鍔炴硶灝辨槸娣誨姞涓涓緟鍔╋紝浣垮垵濮嬬煩闃靛彉涓轟竴涓猲+1鍏冪粍錛岀紪鍙蜂負0鍒皀錛屼笅闈互3涓尗涓轟緥錛?br />              瀹氫箟鍒濆鐭╅樀A(chǔ) = [1 0 0 0]錛?鍙峰厓绱犲浐瀹氫負1錛?~n鍒嗗埆涓哄搴旂殑鐚墍鎷ユ湁鐨勮姳鐢熸暟銆?br />              瀵逛簬絎竴縐嶆搷浣済 i錛屾垜浠湪鍗曚綅鐭╅樀鍩虹涓婁嬌Mat[0][i]鍙樹負1錛屼緥濡俫 1錛?br />              1 1 0 0
              0 1 0 0
              0 0 1 0
              0 0 0 1錛屾樉鐒禰1 0 0 0]*Mat = [1 1 0 0]
              瀵逛簬絎簩縐嶆搷浣渆 i錛屾垜浠湪鍗曚綅鐭╅樀鍩虹浣縈at[i][i] = 0,渚嬪e 2錛?br />              1 0 0 0
              0 1 0 0
              0 0 0 0
              0 0 0 1, 鏄劇劧[1 2 3 4]*Mat = [1 2 0 4]
              瀵逛簬絎笁縐嶆搷浣渟 i j錛屾垜浠湪鍗曚綅鐭╅樀鍩虹涓婁嬌絎琲鍒椾笌絎琷浜掓崲錛屼緥濡俿 1 2錛?br />              1 0 0 0
              0 0 0 1
              0 0 1 0
              0 1 0 0錛屾樉鐒禰1 2 0 4]*Mat = [1 4 0 2]
              鐜板湪錛屽浜庢瘡涓涓搷浣滄垜浠兘鍙互寰楀埌涓涓漿緗煩闃碉紝鎶妅涓搷浣滅殑鐭╅樀鐩鎬箻鎴戜滑鍙互寰楀埌涓涓柊鐨勮漿緗煩闃礣銆?br />              A * T 琛ㄧず鎴戜滑緇忚繃涓緇勬搷浣滐紝綾諱技鎴戜滑鍙互寰楀埌緇忚繃m緇勬搷浣滅殑鐭╅樀涓?A * T ^ m,鏈緇堢煩闃電殑[0][1~n]鍗充負絳旀銆?br />
              涓婅堪鐨勫仛娉曟瘮杈冪洿瑙傦紝浣嗘槸瀹炵幇榪囦簬楹葷儲錛屽洜涓鴻鏋勯爇涓笉鍚岀煩闃點?br />
              鏈夋病鏈夊埆鐨勬柟娉曞彲浠ョ洿鎺ユ瀯閫犺漿緗煩闃礣錛熺瓟妗堟槸鑲畾鐨勩?br />              鎴戜滑榪樻槸浠ュ崟浣嶇煩闃典負鍩虹錛?br />              瀵逛簬絎竴縐嶆搷浣済 i錛屾垜浠嬌Mat[0][i] = Mat[0][i] + 1錛?br />              瀵逛簬絎簩縐嶆搷浣渆 i錛屾垜浠嬌鐭╅樀鐨勭i鍒楁竻闆訛紱
              瀵逛簬絎笁縐嶆搷浣渟 i j錛屾垜浠嬌絎琲鍒椾笌絎琷鍒椾簰鎹€?br />              榪欐牱瀹炵幇鐨勮瘽錛屾垜浠緇堝湪澶勭悊涓涓煩闃碉紝鍏嶅幓鏋勯爇涓煩闃電殑楹葷儲銆?br />
              鑷蟲錛屾瀯閫犺漿緗煩闃礣灝卞畬鎴愪簡錛屾帴涓嬫潵鍙渶鐢ㄧ煩闃靛揩閫熷箓姹傚嚭 A * T ^ m鍗沖彲錛岃繕鏈変竴涓敞鎰忕殑鍦版柟錛岃棰橀渶瑕佺敤鍒發(fā)ong long銆?br />              鍏蜂綋瀹炵幇鍙互鐪嬩笅闈㈢殑浠g爜銆?br />
銆愪唬鐮併戯細

 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 using namespace std;
 5 #define ll long long
 6 #define maxn 105
 7 int n, m, k;
 8 struct Mat {
 9     ll val[maxn][maxn];
10     void zero() {
11         memset(val, 0sizeof(val));
12     }
13     void unit() {
14         zero();
15         for(int i = 0; i < maxn; i++) val[i][i] = 1;
16     }
17 }A, T;//A = 鍒濆鐭╅樀 ,T = 杞疆鐭╅樀
18 
19 Mat operator *(const Mat &a, const Mat &b) {
20     Mat tmp;
21     tmp.zero();
22     for(int k = 0; k <= n; k++) {
23         for(int i = 0; i <= n; i++) {
24             if(a.val[i][k])
25                 for(int j = 0; j <= n; j++)
26                     tmp.val[i][j] += a.val[i][k] * b.val[k][j];
27         }
28     }
29     return tmp;
30 }
31 
32 Mat operator ^(Mat x, int n) {
33     Mat tmp;
34     tmp.unit();
35     while(n) {
36         if(n & 1) tmp = tmp * x;
37         x = x * x;
38         n >>= 1;
39     }
40     return tmp;
41 }
42 
43 void init() {
44     A.zero();
45     A.val[0][0= 1;
46     T.unit();
47 }
48 
49 int main() {
50     char s[5];
51     int a, b;
52     while(~scanf("%d%d%d"&n, &m, &k)) {
53         if(!&& !&& !k) break;
54         init();
55         for(int i = 0; i < k; i++) {
56             scanf("%s", s);
57             if(s[0== 'g') {
58                 scanf("%d"&a);
59                 T.val[0][a]++;
60             } else if(s[0== 'e') {
61                 scanf("%d"&a);
62                 for(int i = 0; i <= n; i++) T.val[i][a] = 0;
63             } else {
64                 scanf("%d%d"&a, &b);
65                 for(int i = 0; i <= n; i++) swap(T.val[i][a], T.val[i][b]);
66             }
67         }
68         Mat ans = A * (T ^ m);
69         for(int i = 1; i <= n; i++) printf("%lld ", ans.val[0][i]);
70         printf("\n");
71     }
72     return 0;
73 }



y @ The Angry Teletubbies 2011-10-01 12:00 鍙戣〃璇勮
]]>
poj 3233 Matrix Power Series - 鐭╅樀蹇熷箓 + 浜屽垎http://m.shnenglu.com/y346491470/articles/156781.htmly @ The Angry Teletubbiesy @ The Angry TeletubbiesSun, 25 Sep 2011 14:42:00 GMThttp://m.shnenglu.com/y346491470/articles/156781.htmlhttp://m.shnenglu.com/y346491470/comments/156781.htmlhttp://m.shnenglu.com/y346491470/articles/156781.html#Feedback0http://m.shnenglu.com/y346491470/comments/commentRss/156781.htmlhttp://m.shnenglu.com/y346491470/services/trackbacks/156781.htmlS = A + A2 + A3 + … + Ak

銆愰瑙c戯細浠ヤ笅鏄痬atrix67鐨勯瑙o細

榪欓亾棰樹袱嬈′簩鍒嗭紝鐩稿綋緇忓吀銆傞鍏堟垜浠煡閬擄紝A^i鍙互浜屽垎姹傚嚭銆傜劧鍚庢垜浠渶瑕佸鏁翠釜棰樼洰鐨勬暟鎹妯榪涜浜屽垎銆傛瘮濡傦紝褰搆=6鏃訛紝鏈夛細
A + A^2 + A^3 + A^4 + A^5 + A^6 =(A + A^2 + A^3) + A^3*(A + A^2 + A^3)
搴旂敤榪欎釜寮忓瓙鍚庯紝瑙勬āk鍑忓皬浜嗕竴鍗娿傛垜浠簩鍒嗘眰鍑篈^3鍚庡啀閫掑綊鍦拌綆桝 + A^2 + A^3錛屽嵆鍙緱鍒板師闂鐨勭瓟妗堛?/p>


銆愪唬鐮併戯細
 1 #include "iostream"
 2 #include "cstring"
 3 #include "cstdio"
 4 using namespace std;
 5 #define maxn 35
 6 int n, k, m;
 7 struct Mat {
 8     int val[maxn][maxn];
 9     void unit() {//鍗曚綅鐭╅樀
10         for(int i = 0; i < maxn; i++) val[i][i] = 1;
11     }
12     void zero() {//闆剁煩闃?/span>
13         memset(val, 0sizeof(val));
14     }
15 }x;
16 
17 Mat operator *(const Mat &a, const Mat &b) {//鐭╅樀涔樻硶
18     Mat tmp;
19     tmp.zero();
20     for(int k = 1; k <= n; k++) {
21         for(int i = 1; i <= n; i++)
22             if(a.val[i][k])
23                 for(int j = 1; j <= n; j++) {
24                     tmp.val[i][j] += a.val[i][k] * b.val[k][j];
25                     if(tmp.val[i][j] >= m) tmp.val[i][j] %= m;
26                 }
27     }
28     return tmp;
29 }
30 
31 Mat operator ^(Mat x, int n) {//鐭╅樀蹇熷箓
32     Mat tmp;
33     tmp.zero();
34     tmp.unit();
35     while(n) {
36         if(n & 1) tmp = tmp * x;
37         x = x * x;
38         n >>= 1;
39     }
40     return tmp;
41 }
42 
43 Mat operator +(const Mat &a, const Mat &b) {//鐭╅樀鍔犳硶
44     Mat tmp;
45     for(int i = 1; i <= n; i++)
46         for(int j = 1; j <= n; j++)
47             tmp.val[i][j] = (a.val[i][j] + b.val[i][j]) % m;
48     return tmp;
49 }
50 
51 Mat sum(int k) {
52     if(k == 1return x;
53     else {
54         Mat tmp = sum(k >> 1);
55         if(k & 1) {
56             Mat tmp2 = x ^ ((k >> 1+ 1);
57             return tmp + tmp2 + tmp * tmp2;
58         } else {
59             Mat tmp2 = x ^ (k >> 1);
60             return tmp + tmp * tmp2;
61         }
62     }
63 }
64 
65 int main() {
66     while(~scanf("%d%d%d"&n, &k, &m)) {
67         for(int i = 1; i <= n; i++) {
68             for(int j = 1; j <= n; j++) {
69                 scanf("%d"&x.val[i][j]);
70                 x.val[i][j] %= m;
71             }
72         }
73         Mat ans = sum(k);
74         for(int i = 1; i <= n; i++) {
75             for(int j = 1; j < n; j++
76                 printf("%d ", ans.val[i][j]);
77             printf("%d\n", ans.val[i][n]);
78         }
79         break;
80     }
81     return 0;
82 }




y @ The Angry Teletubbies 2011-09-25 22:42 鍙戣〃璇勮
]]>
poj 3070 Fibonacci - 鐭╅樀蹇熷箓姹侳ibonacci鏁?/title><link>http://m.shnenglu.com/y346491470/articles/156779.html</link><dc:creator>y @ The Angry Teletubbies</dc:creator><author>y @ The Angry Teletubbies</author><pubDate>Sun, 25 Sep 2011 14:25:00 GMT</pubDate><guid>http://m.shnenglu.com/y346491470/articles/156779.html</guid><wfw:comment>http://m.shnenglu.com/y346491470/comments/156779.html</wfw:comment><comments>http://m.shnenglu.com/y346491470/articles/156779.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/y346491470/comments/commentRss/156779.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/y346491470/services/trackbacks/156779.html</trackback:ping><description><![CDATA[銆愰鎰忋戯細姹侳ibonacci鏁板垪涓殑絎琻欏圭殑鏈鍚?涓暟瀛楋紝涓嶅寘鍚墠瀵?銆?br /><br />銆愰瑙c戯細Fibonacci婊¤凍浠ヤ笅鍏紡錛?br />                               <img align="middle" src="http://poj.org/images/3070_1.png" alt="" /><br />               鏋勯犵煩闃碉紝鍒╃敤鐭╅樀蹇熷箓姹傝В銆?br /><br />銆愪唬鐮併戯細 <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"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080"> 1</span> <span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">iostream</span><span style="color: #000000">"</span><span style="color: #000000"><br /></span><span style="color: #008080"> 2</span> <span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">cstdio</span><span style="color: #000000">"</span><span style="color: #000000"><br /></span><span style="color: #008080"> 3</span> <span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">cstring</span><span style="color: #000000">"</span><span style="color: #000000"><br /></span><span style="color: #008080"> 4</span> <span style="color: #000000"></span><span style="color: #0000ff">using</span><span style="color: #000000"> </span><span style="color: #0000ff">namespace</span><span style="color: #000000"> std;<br /></span><span style="color: #008080"> 5</span> <span style="color: #000000"></span><span style="color: #0000ff">#define</span><span style="color: #000000"> MAX 3</span><span style="color: #000000"><br /></span><span style="color: #008080"> 6</span> <span style="color: #000000"></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">10000</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 7</span> <span style="color: #000000"></span><span style="color: #0000ff">struct</span><span style="color: #000000"> Mat {<br /></span><span style="color: #008080"> 8</span> <span style="color: #000000">    </span><span style="color: #0000ff">int</span><span style="color: #000000"> val[MAX][MAX];<br /></span><span style="color: #008080"> 9</span> <span style="color: #000000">    </span><span style="color: #0000ff">void</span><span style="color: #000000"> unit() {<br /></span><span style="color: #008080">10</span> <span style="color: #000000">        </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"> MAX; i</span><span style="color: #000000">++</span><span style="color: #000000">) val[i][i] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">;<br /></span><span style="color: #008080">11</span> <span style="color: #000000">    }<br /></span><span style="color: #008080">12</span> <span style="color: #000000">    </span><span style="color: #0000ff">void</span><span style="color: #000000"> zero() {<br /></span><span style="color: #008080">13</span> <span style="color: #000000">        memset(val, </span><span style="color: #000000">0</span><span style="color: #000000">, </span><span style="color: #0000ff">sizeof</span><span style="color: #000000">(val));<br /></span><span style="color: #008080">14</span> <span style="color: #000000">    }<br /></span><span style="color: #008080">15</span> <span style="color: #000000">};<br /></span><span style="color: #008080">16</span> <span style="color: #000000"><br /></span><span style="color: #008080">17</span> <span style="color: #000000">Mat </span><span style="color: #0000ff">operator</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000">(</span><span style="color: #0000ff">const</span><span style="color: #000000"> Mat </span><span style="color: #000000">&</span><span style="color: #000000">a, </span><span style="color: #0000ff">const</span><span style="color: #000000"> Mat </span><span style="color: #000000">&</span><span style="color: #000000">b) {<br /></span><span style="color: #008080">18</span> <span style="color: #000000">    Mat tmp;<br /></span><span style="color: #008080">19</span> <span style="color: #000000">    tmp.zero();<br /></span><span style="color: #008080">20</span> <span style="color: #000000">    </span><span style="color: #0000ff">for</span><span style="color: #000000">(</span><span style="color: #0000ff">int</span><span style="color: #000000"> k </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">; k </span><span style="color: #000000"><</span><span style="color: #000000"> MAX; k</span><span style="color: #000000">++</span><span style="color: #000000">) {<br /></span><span style="color: #008080">21</span> <span style="color: #000000">        </span><span style="color: #0000ff">for</span><span style="color: #000000">(</span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">; i </span><span style="color: #000000"><</span><span style="color: #000000"> MAX; i</span><span style="color: #000000">++</span><span style="color: #000000">) {<br /></span><span style="color: #008080">22</span> <span style="color: #000000">            </span><span style="color: #0000ff">if</span><span style="color: #000000">(a.val[i][k])<br /></span><span style="color: #008080">23</span> <span style="color: #000000">                </span><span style="color: #0000ff">for</span><span style="color: #000000">(</span><span style="color: #0000ff">int</span><span style="color: #000000"> j </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">; j </span><span style="color: #000000"><</span><span style="color: #000000"> MAX; j</span><span style="color: #000000">++</span><span style="color: #000000">) {<br /></span><span style="color: #008080">24</span> <span style="color: #000000">                    tmp.val[i][j] </span><span style="color: #000000">+=</span><span style="color: #000000"> a.val[i][k] </span><span style="color: #000000">*</span><span style="color: #000000"> b.val[k][j];<br /></span><span style="color: #008080">25</span> <span style="color: #000000">                    </span><span style="color: #0000ff">if</span><span style="color: #000000">(tmp.val[i][j] </span><span style="color: #000000">>=</span><span style="color: #000000"> MOD) tmp.val[i][j] </span><span style="color: #000000">%=</span><span style="color: #000000"> MOD;<br /></span><span style="color: #008080">26</span> <span style="color: #000000">                }<br /></span><span style="color: #008080">27</span> <span style="color: #000000">        }<br /></span><span style="color: #008080">28</span> <span style="color: #000000">    }<br /></span><span style="color: #008080">29</span> <span style="color: #000000">    </span><span style="color: #0000ff">return</span><span style="color: #000000"> tmp;<br /></span><span style="color: #008080">30</span> <span style="color: #000000">}<br /></span><span style="color: #008080">31</span> <span style="color: #000000"><br /></span><span style="color: #008080">32</span> <span style="color: #000000">Mat </span><span style="color: #0000ff">operator</span><span style="color: #000000"> </span><span style="color: #000000">^</span><span style="color: #000000">(Mat x, </span><span style="color: #0000ff">int</span><span style="color: #000000"> n) {<br /></span><span style="color: #008080">33</span> <span style="color: #000000">    Mat tmp;<br /></span><span style="color: #008080">34</span> <span style="color: #000000">    tmp.zero(), tmp.unit();<br /></span><span style="color: #008080">35</span> <span style="color: #000000">    </span><span style="color: #0000ff">while</span><span style="color: #000000">(n) {<br /></span><span style="color: #008080">36</span> <span style="color: #000000">        </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">1</span><span style="color: #000000">) tmp </span><span style="color: #000000">=</span><span style="color: #000000"> tmp </span><span style="color: #000000">*</span><span style="color: #000000"> x;<br /></span><span style="color: #008080">37</span> <span style="color: #000000">        x </span><span style="color: #000000">=</span><span style="color: #000000"> x </span><span style="color: #000000">*</span><span style="color: #000000"> x;<br /></span><span style="color: #008080">38</span> <span style="color: #000000">        n </span><span style="color: #000000">>>=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">;<br /></span><span style="color: #008080">39</span> <span style="color: #000000">    }<br /></span><span style="color: #008080">40</span> <span style="color: #000000">    </span><span style="color: #0000ff">return</span><span style="color: #000000"> tmp;<br /></span><span style="color: #008080">41</span> <span style="color: #000000">}<br /></span><span style="color: #008080">42</span> <span style="color: #000000"><br /></span><span style="color: #008080">43</span> <span style="color: #000000"></span><span style="color: #0000ff">int</span><span style="color: #000000"> main() {<br /></span><span style="color: #008080">44</span> <span style="color: #000000">    Mat x;<br /></span><span style="color: #008080">45</span> <span style="color: #000000">    </span><span style="color: #0000ff">int</span><span style="color: #000000"> n;<br /></span><span style="color: #008080">46</span> <span style="color: #000000">    x.val[</span><span style="color: #000000">1</span><span style="color: #000000">][</span><span style="color: #000000">1</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> x.val[</span><span style="color: #000000">1</span><span style="color: #000000">][</span><span style="color: #000000">2</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> x.val[</span><span style="color: #000000">2</span><span style="color: #000000">][</span><span style="color: #000000">1</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">, x.val[</span><span style="color: #000000">2</span><span style="color: #000000">][</span><span style="color: #000000">2</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080">47</span> <span style="color: #000000">    </span><span style="color: #0000ff">while</span><span style="color: #000000">(</span><span style="color: #000000">~</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">n)) {<br /></span><span style="color: #008080">48</span> <span style="color: #000000">        </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">-</span><span style="color: #000000">1</span><span style="color: #000000">) </span><span style="color: #0000ff">break</span><span style="color: #000000">;<br /></span><span style="color: #008080">49</span> <span style="color: #000000">        Mat ans </span><span style="color: #000000">=</span><span style="color: #000000"> x </span><span style="color: #000000">^</span><span style="color: #000000"> n;<br /></span><span style="color: #008080">50</span> <span style="color: #000000">        printf(</span><span style="color: #000000">"</span><span style="color: #000000">%d\n</span><span style="color: #000000">"</span><span style="color: #000000">, ans.val[</span><span style="color: #000000">1</span><span style="color: #000000">][</span><span style="color: #000000">2</span><span style="color: #000000">]);<br /></span><span style="color: #008080">51</span> <span style="color: #000000">    }<br /></span><span style="color: #008080">52</span> <span style="color: #000000">    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080">53</span> <span style="color: #000000">}<br /></span><span style="color: #008080">54</span> <span style="color: #000000"></span></div><br /><img src ="http://m.shnenglu.com/y346491470/aggbug/156779.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/y346491470/" target="_blank">y @ The Angry Teletubbies</a> 2011-09-25 22:25 <a href="http://m.shnenglu.com/y346491470/articles/156779.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <a href="http://m.shnenglu.com/">青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品</a> <div style="position:fixed;left:-9000px;top:-9000px;"><font id="pjuwb"></font><button id="pjuwb"><pre id="pjuwb"></pre></button><sub id="pjuwb"></sub><tbody id="pjuwb"><var id="pjuwb"><address id="pjuwb"></address></var></tbody><listing id="pjuwb"><label id="pjuwb"><strong id="pjuwb"></strong></label></listing><wbr id="pjuwb"><small id="pjuwb"><tbody id="pjuwb"></tbody></small></wbr><ins id="pjuwb"><xmp id="pjuwb"></xmp></ins><style id="pjuwb"></style><label id="pjuwb"><em id="pjuwb"><li id="pjuwb"></li></em></label><samp id="pjuwb"></samp><menu id="pjuwb"><input id="pjuwb"></input></menu><pre id="pjuwb"><tbody id="pjuwb"><tfoot id="pjuwb"><button id="pjuwb"></button></tfoot></tbody></pre><form id="pjuwb"></form><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"><sup id="pjuwb"></sup></label></style></i><li id="pjuwb"><table id="pjuwb"><abbr id="pjuwb"></abbr></table></li><video id="pjuwb"></video><dfn id="pjuwb"></dfn><progress id="pjuwb"></progress><strong id="pjuwb"></strong><mark id="pjuwb"></mark><em id="pjuwb"></em><tbody id="pjuwb"><p id="pjuwb"><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike></p></tbody><option id="pjuwb"></option><strike id="pjuwb"></strike><u id="pjuwb"></u><td id="pjuwb"><center id="pjuwb"><tr id="pjuwb"></tr></center></td><em id="pjuwb"><mark id="pjuwb"><em id="pjuwb"><tt id="pjuwb"></tt></em></mark></em><strong id="pjuwb"></strong><wbr id="pjuwb"></wbr><s id="pjuwb"></s><strong id="pjuwb"></strong><legend id="pjuwb"></legend><nav id="pjuwb"></nav><dl id="pjuwb"><th id="pjuwb"><dl id="pjuwb"></dl></th></dl><noframes id="pjuwb"><ins id="pjuwb"></ins></noframes><font id="pjuwb"></font><strike id="pjuwb"><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"></label></style></i></strike><output id="pjuwb"></output><thead id="pjuwb"><pre id="pjuwb"></pre></thead><source id="pjuwb"></source><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem><pre id="pjuwb"><span id="pjuwb"><pre id="pjuwb"><big id="pjuwb"></big></pre></span></pre><cite id="pjuwb"><fieldset id="pjuwb"><s id="pjuwb"><rt id="pjuwb"></rt></s></fieldset></cite><big id="pjuwb"><progress id="pjuwb"><big id="pjuwb"></big></progress></big><samp id="pjuwb"><delect id="pjuwb"></delect></samp><dl id="pjuwb"></dl><strike id="pjuwb"><nav id="pjuwb"><dl id="pjuwb"><strong id="pjuwb"></strong></dl></nav></strike><tbody id="pjuwb"><b id="pjuwb"><optgroup id="pjuwb"><rp id="pjuwb"></rp></optgroup></b></tbody><em id="pjuwb"></em><xmp id="pjuwb"><blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote></xmp> <i id="pjuwb"><abbr id="pjuwb"><i id="pjuwb"><abbr id="pjuwb"></abbr></i></abbr></i><center id="pjuwb"><acronym id="pjuwb"><center id="pjuwb"></center></acronym></center><pre id="pjuwb"></pre><ul id="pjuwb"><thead id="pjuwb"></thead></ul><blockquote id="pjuwb"><pre id="pjuwb"><sup id="pjuwb"></sup></pre></blockquote><acronym id="pjuwb"></acronym><big id="pjuwb"><s id="pjuwb"></s></big><th id="pjuwb"></th><th id="pjuwb"></th><tbody id="pjuwb"></tbody><thead id="pjuwb"><strike id="pjuwb"></strike></thead><th id="pjuwb"><dl id="pjuwb"><wbr id="pjuwb"></wbr></dl></th><dl id="pjuwb"><strong id="pjuwb"></strong></dl><abbr id="pjuwb"><noframes id="pjuwb"><noscript id="pjuwb"></noscript></noframes></abbr><td id="pjuwb"><ol id="pjuwb"></ol></td><li id="pjuwb"><noscript id="pjuwb"><abbr id="pjuwb"></abbr></noscript></li><small id="pjuwb"><bdo id="pjuwb"><nav id="pjuwb"></nav></bdo></small><style id="pjuwb"></style><optgroup id="pjuwb"><table id="pjuwb"></table></optgroup><center id="pjuwb"><tr id="pjuwb"><dfn id="pjuwb"></dfn></tr></center><th id="pjuwb"></th><u id="pjuwb"></u><tfoot id="pjuwb"><legend id="pjuwb"><i id="pjuwb"></i></legend></tfoot><mark id="pjuwb"></mark><meter id="pjuwb"></meter><nav id="pjuwb"></nav><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><nobr id="pjuwb"></nobr><sub id="pjuwb"><th id="pjuwb"><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem></th></sub><thead id="pjuwb"><sub id="pjuwb"></sub></thead><ul id="pjuwb"><address id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></address></ul><dfn id="pjuwb"></dfn><pre id="pjuwb"></pre><input id="pjuwb"><cite id="pjuwb"><fieldset id="pjuwb"></fieldset></cite></input><u id="pjuwb"><form id="pjuwb"><u id="pjuwb"></u></form></u><kbd id="pjuwb"><em id="pjuwb"><mark id="pjuwb"></mark></em></kbd><tr id="pjuwb"></tr><del id="pjuwb"><form id="pjuwb"><address id="pjuwb"></address></form></del><tfoot id="pjuwb"><legend id="pjuwb"><ol id="pjuwb"><dl id="pjuwb"></dl></ol></legend></tfoot><menu id="pjuwb"><nobr id="pjuwb"><th id="pjuwb"><nobr id="pjuwb"></nobr></th></nobr></menu><fieldset id="pjuwb"></fieldset><pre id="pjuwb"><blockquote id="pjuwb"><samp id="pjuwb"></samp></blockquote></pre><xmp id="pjuwb"><sup id="pjuwb"><pre id="pjuwb"></pre></sup></xmp><span id="pjuwb"><progress id="pjuwb"></progress></span><font id="pjuwb"></font><var id="pjuwb"><abbr id="pjuwb"></abbr></var><strong id="pjuwb"><label id="pjuwb"><i id="pjuwb"><legend id="pjuwb"></legend></i></label></strong><tr id="pjuwb"><em id="pjuwb"><em id="pjuwb"><output id="pjuwb"></output></em></em></tr><thead id="pjuwb"><strike id="pjuwb"></strike></thead> <acronym id="pjuwb"></acronym><i id="pjuwb"></i><tt id="pjuwb"></tt><rt id="pjuwb"><source id="pjuwb"><rt id="pjuwb"></rt></source></rt><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike><del id="pjuwb"></del><font id="pjuwb"><output id="pjuwb"><ins id="pjuwb"><output id="pjuwb"></output></ins></output></font><kbd id="pjuwb"><tr id="pjuwb"><kbd id="pjuwb"></kbd></tr></kbd><pre id="pjuwb"><sup id="pjuwb"><delect id="pjuwb"><samp id="pjuwb"></samp></delect></sup></pre><samp id="pjuwb"></samp><track id="pjuwb"></track><tr id="pjuwb"></tr><center id="pjuwb"></center><fieldset id="pjuwb"></fieldset><i id="pjuwb"></i><td id="pjuwb"></td><rt id="pjuwb"></rt><object id="pjuwb"></object><pre id="pjuwb"><progress id="pjuwb"><sub id="pjuwb"><thead id="pjuwb"></thead></sub></progress></pre><kbd id="pjuwb"><tr id="pjuwb"><option id="pjuwb"></option></tr></kbd><output id="pjuwb"><ins id="pjuwb"></ins></output><ol id="pjuwb"></ol><source id="pjuwb"></source><strong id="pjuwb"></strong><ruby id="pjuwb"></ruby><sub id="pjuwb"><meter id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></meter></sub><pre id="pjuwb"></pre><center id="pjuwb"></center><tr id="pjuwb"><tbody id="pjuwb"><xmp id="pjuwb"><dd id="pjuwb"></dd></xmp></tbody></tr><video id="pjuwb"></video><pre id="pjuwb"></pre><form id="pjuwb"><optgroup id="pjuwb"></optgroup></form><samp id="pjuwb"></samp><kbd id="pjuwb"></kbd><strong id="pjuwb"><option id="pjuwb"></option></strong><object id="pjuwb"></object><abbr id="pjuwb"><noframes id="pjuwb"><abbr id="pjuwb"></abbr></noframes></abbr><ul id="pjuwb"><del id="pjuwb"><button id="pjuwb"><pre id="pjuwb"></pre></button></del></ul><abbr id="pjuwb"></abbr><strong id="pjuwb"><code id="pjuwb"><strong id="pjuwb"></strong></code></strong><option id="pjuwb"></option><optgroup id="pjuwb"><bdo id="pjuwb"><code id="pjuwb"></code></bdo></optgroup><mark id="pjuwb"><em id="pjuwb"><font id="pjuwb"></font></em></mark><acronym id="pjuwb"><code id="pjuwb"></code></acronym><dl id="pjuwb"></dl><em id="pjuwb"></em><object id="pjuwb"><input id="pjuwb"><object id="pjuwb"></object></input></object><output id="pjuwb"><dd id="pjuwb"></dd></output><option id="pjuwb"><button id="pjuwb"><option id="pjuwb"></option></button></option><small id="pjuwb"></small></div> <a href="http://luoliguo.com" target="_blank">欧美高清视频免费观看</a>| <a href="http://67idid.com" target="_blank">性做久久久久久久免费看</a>| <a href="http://wo6wo.com" target="_blank">99成人在线</a>| <a href="http://576193.com" target="_blank">日韩亚洲国产欧美</a>| <a href="http://wtoykd.com" target="_blank">亚洲午夜精品久久久久久app</a>| <a href="http://481323.com" target="_blank">一区二区久久</a>| <a href="http://www-119049.com" target="_blank">亚洲欧美国产精品va在线观看</a>| <a href="http://55555549.com" target="_blank">亚洲在线观看免费视频</a>| <a href="http://376524.com" target="_blank">午夜免费日韩视频</a>| <a href="http://2061375.com" target="_blank">欧美区一区二</a>| <a href="http://chunshanketang.com" target="_blank">欧美一区二区三区的</a>| <a href="http://www77vcd.com" target="_blank">国产精品久久久久久影院8一贰佰</a>| <a href="http://20074972.com" target="_blank">性伦欧美刺激片在线观看</a>| <a href="http://kanzhelu31.com" target="_blank">久久亚洲精品中文字幕冲田杏梨</a>| <a href="http://337791.com" target="_blank">欧美电影在线播放</a>| <a href="http://jizz16.com" target="_blank">亚洲美女精品成人在线视频</a>| <a href="http://cz-hongbangfloor.com" target="_blank">另类av导航</a>| <a href="http://luqintang.com" target="_blank">亚洲在线一区二区三区</a>| <a href="http://811914.com" target="_blank">亚洲一区二区在线播放</a>| <a href="http://www474000c.com" target="_blank">亚洲六月丁香色婷婷综合久久</a>| <a href="http://405151.com" target="_blank">亚洲精品黄色</a>| <a href="http://mxkaozi.com" target="_blank">亚洲香蕉成视频在线观看 </a>| <a href="http://zztto7.com" target="_blank">久久精品视频免费播放</a>| <a href="http://zhipiao998.com" target="_blank">久久午夜精品一区二区</a>| <a href="http://cc28256.com" target="_blank">亚洲欧洲精品一区</a>| <a href="http://haomscq.com" target="_blank">欧美一区二区三区四区夜夜大片 </a>| <a href="http://88844401.com" target="_blank">欧美一级久久</a>| <a href="http://xsjgxx.com" target="_blank">久热国产精品</a>| <a href="http://fsxinruiph.com" target="_blank">国产精品wwwwww</a>| <a href="http://pfpf66.com" target="_blank">亚洲国产欧美精品</a>| <a href="http://www-9694.com" target="_blank">亚洲欧美亚洲</a>| <a href="http://580078.com" target="_blank">亚洲欧美日韩国产综合</a>| <a href="http://ae262.com" target="_blank">另类酷文…触手系列精品集v1小说</a>| <a href="http://xb989.com" target="_blank">亚洲精品视频在线观看免费</a>| <a href="http://66jj99.com" target="_blank">久久国产成人</a>| <a href="http://love136.com" target="_blank">国产精品嫩草影院av蜜臀</a>| <a href="http://495177.com" target="_blank">亚洲清纯自拍</a>| <a href="http://www31931.com" target="_blank">另类专区欧美制服同性</a>| <a href="http://7885888.com" target="_blank">亚洲影院免费观看</a>| <a href="http://152mu.com" target="_blank">亚洲电影免费</a>| <a href="http://02326a.com" target="_blank">久久丁香综合五月国产三级网站</a>| <a href="http://www-9694.com" target="_blank">欧美精品一区视频</a>| <a href="http://www033459.com" target="_blank">亚洲电影专区</a>| <a href="http://6055365.com" target="_blank">久久夜精品va视频免费观看</a>| <a href="http://ktt2048.com" target="_blank">亚洲男人第一av网站</a>| <a href="http://icciran.com" target="_blank">欧美日韩一区在线观看视频</a>| <a href="http://152mu.com" target="_blank">亚洲欧洲一区二区在线观看</a>| <a href="http://xxxcalls.com" target="_blank">久久综合福利</a>| <a href="http://yc7878.com" target="_blank">原创国产精品91</a>| <a href="http://cuucs.com" target="_blank">一区二区三区我不卡</a>| <a href="http://689558.com" target="_blank">午夜精品视频</a>| <a href="http://yxtczx.com" target="_blank">亚洲性夜色噜噜噜7777</a>| <a href="http://pinyuanad.com" target="_blank">欧美日韩高清一区</a>| <a href="http://66688811.com" target="_blank">亚洲伦理精品</a>| <a href="http://free18teen.com" target="_blank">久色婷婷小香蕉久久</a>| <a href="http://9882355.com" target="_blank">欧美三区在线视频</a>| <a href="http://9931111.com" target="_blank">国内精品久久久</a>| <a href="http://yyy922.com" target="_blank">久久国产精品免费一区</a>| <a href="http://kittybob.com" target="_blank">欧美色图首页</a>| <a href="http://x1317.com" target="_blank">中文精品在线</a>| <a href="http://862323.com" target="_blank">夜夜爽夜夜爽精品视频</a>| <a href="http://ccc36-com.com" target="_blank">欧美一区二区三区另类</a>| <a href="http://bdkaoyan.com" target="_blank">亚洲精品视频在线观看免费</a>| <a href="http://5917t.com" target="_blank">欧美日韩一区国产</a>| <a href="http://www456456.com" target="_blank">国产精品嫩草99a</a>| <a href="http://coerverbeijing.com" target="_blank">正在播放亚洲</a>| <a href="http://tongrenyaoye.com" target="_blank">亚洲日韩欧美视频</a>| <a href="http://cpb-group.com" target="_blank">欧美国产在线观看</a>| <a href="http://eee285.com" target="_blank">亚洲国产天堂久久国产91</a>| <a href="http://wwwgay456.com" target="_blank">亚洲一区视频在线</a>| <a href="http://51duanxinmao.com" target="_blank">在线午夜精品</a>| <a href="http://cnlbogs.com" target="_blank">国产亚洲精品久久久久久</a>| <a href="http://zunguidq.com" target="_blank">久久成人av少妇免费</a>| <a href="http://378682.com" target="_blank">久久国产欧美精品</a>| <a href="http://yy306.com" target="_blank">亚洲国产欧美一区二区三区同亚洲 </a>| <a href="http://wwwqm9.com" target="_blank">91久久嫩草影院一区二区</a>| <a href="http://zzchanke.com" target="_blank">玖玖玖国产精品</a>| <a href="http://s0247.com" target="_blank">91久久国产自产拍夜夜嗨</a>| <a href="http://www218999.com" target="_blank">亚洲国产成人不卡</a>| <a href="http://ourskycity.com" target="_blank">欧美日韩亚洲视频一区</a>| <a href="http://www1982t.com" target="_blank">国产精品美腿一区在线看</a>| <a href="http://wwwen41.com" target="_blank">欧美在线电影</a>| <a href="http://667996.com" target="_blank">老鸭窝91久久精品色噜噜导演</a>| <a href="http://857sds.com" target="_blank">在线观看亚洲一区</a>| <a href="http://710477.com" target="_blank">日韩视频在线你懂得</a>| <a href="http://9a5x.com" target="_blank">国产精品一区在线播放</a>| <a href="http://www-833898.com" target="_blank">毛片基地黄久久久久久天堂</a>| <a href="http://sz-jyqj.com" target="_blank">奶水喷射视频一区</a>| <a href="http://5cok.com" target="_blank">亚洲欧美激情精品一区二区</a>| <a href="http://www107aa.com" target="_blank">午夜影视日本亚洲欧洲精品</a>| <a href="http://taoseav8.com" target="_blank">在线看无码的免费网站</a>| <a href="http://www-4564949.com" target="_blank">欧美剧在线免费观看网站</a>| <a href="http://hbshwx.com" target="_blank">日韩五码在线</a>| <a href="http://njhuike.com" target="_blank">亚洲欧美国产日韩中文字幕</a>| <a href="http://e789a.com" target="_blank">亚洲国产日韩一区二区</a>| <a href="http://743627.com" target="_blank">一区二区三区四区五区精品</a>| <a href="http://zz9876.com" target="_blank">国产亚洲欧美日韩日本</a>| <a href="http://17vx.com" target="_blank">亚洲黄色尤物视频</a>| <a href="http://bjygp.com" target="_blank">国产欧美日韩综合一区在线观看</a>| <a href="http://220fuke.com" target="_blank">免费看的黄色欧美网站</a>| <a href="http://017492.com" target="_blank">国产精品国色综合久久</a>| <a href="http://by3787.com" target="_blank">免费视频一区</a>| <a href="http://devmashup.com" target="_blank">国产精品视频最多的网站</a>| <a href="http://507139.com" target="_blank">欧美国产精品</a>| <a href="http://apap77.com" target="_blank">欧美性事免费在线观看</a>| <a href="http://iietao.com" target="_blank">亚洲视频网在线直播</a>| <a href="http://wy77777.com" target="_blank">狠狠综合久久</a>| <a href="http://569688.com" target="_blank">中文亚洲字幕</a>| <a href="http://6623555.com" target="_blank">米奇777在线欧美播放</a>| <a href="http://72966t.com" target="_blank">亚洲欧美欧美一区二区三区</a>| <a href="http://www48929.com" target="_blank">久久噜噜亚洲综合</a>| <a href="http://www369cf.com" target="_blank">午夜亚洲视频</a>| <a href="http://66636by.com" target="_blank">欧美激情一区二区三区四区</a>| <a href="http://lfxhfh.com" target="_blank">久久久久综合一区二区三区</a>| <a href="http://xvideoxxnx.com" target="_blank">欧美日韩国产一区二区三区</a>| <a href="http://xxoo668.com" target="_blank">另类激情亚洲</a>| <a href="http://799868.com" target="_blank">国产午夜精品理论片a级大结局 </a>| <a href="http://hkbsi.com" target="_blank">久久久久久亚洲综合影院红桃 </a>| <a href="http://www-888690.com" target="_blank">久久国产色av</a>| <a href="http://7782y.com" target="_blank">欧美日韩一区二区三区四区五区</a>| <a href="http://cao3636.com" target="_blank">免费看黄裸体一级大秀欧美</a>| <a href="http://jnhrjixie.com" target="_blank">国产欧美在线观看</a>| <a href="http://9uu91.com" target="_blank">亚洲午夜日本在线观看</a>| <a href="http://belerbb.com" target="_blank">99视频一区二区</a>| <a href="http://y08877.com" target="_blank">欧美xx69</a>| <a href="http://49028b.com" target="_blank">亚洲高清视频中文字幕</a>| <a href="http://gzhachi.com" target="_blank">狠狠色狠狠色综合系列</a>| <a href="http://xhs015.com" target="_blank">一区二区三区成人</a>| <a href="http://gjjlzs.com" target="_blank">亚洲激情不卡</a>| <a href="http://765409.com" target="_blank">久久一区中文字幕</a>| <a href="http://www57669.com" target="_blank">久久夜色精品国产噜噜av</a>| <a href="http://www068hs.com" target="_blank">久久精品视频播放</a>| <a href="http://389746.com" target="_blank">久久九九精品</a>| <a href="http://eastasp.com" target="_blank">国产一区二区日韩</a>| <a href="http://exsecular.com" target="_blank">欧美亚洲三级</a>| <a href="http://by3180.com" target="_blank">久久国产精彩视频</a>| <a href="http://kxm6868.com" target="_blank">国产一区二区欧美</a>| <a href="http://576193.com" target="_blank">久久亚洲精品中文字幕冲田杏梨</a>| <a href="http://bdkaoyan.com" target="_blank">久久综合色一综合色88</a>| <a href="http://114499com.com" target="_blank">黄色成人在线网址</a>| <a href="http://hcbr365.com" target="_blank">久久五月天婷婷</a>| <a href="http://7a6a.com" target="_blank">欧美激情第1页</a>| <a href="http://llamkos.com" target="_blank">日韩小视频在线观看专区</a>| <a href="http://7373se.com" target="_blank">亚洲一区在线播放</a>| <a href="http://59jf.com" target="_blank">久久av一区二区三区</a>| <a href="http://329374.com" target="_blank">久久久久久有精品国产</a>| <a href="http://9952222.com" target="_blank">精品不卡在线</a>| <a href="http://666043.com" target="_blank">欧美成人一区二免费视频软件</a>| <a href="http://www-577511.com" target="_blank">欧美激情中文不卡</a>| <a href="http://www-n77.com" target="_blank">99精品热视频</a>| <a href="http://proenhub.com" target="_blank">国产精品国产三级国产aⅴ浪潮 </a>| <a href="http://868482.com" target="_blank">亚洲在线一区</a>| <a href="http://kanebocos.com" target="_blank">久久国产成人</a>| <a href="http://www381818.com" target="_blank">永久免费精品影视网站</a>| <a href="http://6w7y.com" target="_blank">伊人色综合久久天天五月婷</a>| <a href="http://97sgg.com" target="_blank">久久久精品一品道一区</a>| <a href="http://bjopl.com" target="_blank">136国产福利精品导航网址</a>| <a href="http://sdjinchuan.com" target="_blank">欧美激情一级片一区二区</a>| <a href="http://simextec.com" target="_blank">在线不卡中文字幕</a>| <a href="http://794579.com" target="_blank">欧美韩日一区二区</a>| <a href="http://86868o.com" target="_blank">一区二区欧美在线</a>| <a href="http://wwzz3.com" target="_blank">亚洲区第一页</a>| <a href="http://ju5558.com" target="_blank">久久gogo国模啪啪人体图</a>| <a href="http://www72227.com" target="_blank">美女国内精品自产拍在线播放</a>| <a href="http://92y5.com" target="_blank">久久一区亚洲</a>| <a href="http://free18teen.com" target="_blank">在线中文字幕一区</a>| <a href="http://044925.com" target="_blank">久久久免费精品</a>| <a href="http://pmref.com" target="_blank">国产欧美日韩高清</a>| <a href="http://aa56789.com" target="_blank">国产在线不卡视频</a>| <a href="http://belerbb.com" target="_blank">国产精品久久久久久久久久ktv</a>| <a href="http://www474000c.com" target="_blank">欧美日韩在线三级</a>| <a href="http://6399128.com" target="_blank">久久在线91</a>| <a href="http://www134rr.com" target="_blank">亚洲韩国精品一区</a>| <a href="http://tyaisen.com" target="_blank">欧美视频一区二区在线观看</a>| <a href="http://2343ww.com" target="_blank">欧美亚洲日本国产</a>| <a href="http://004ttt.com" target="_blank">亚洲国产一区二区三区在线播 </a>| <a href="http://058888e.com" target="_blank">另类亚洲自拍</a>| <a href="http://86311ib.com" target="_blank">亚洲日本中文字幕区</a>| <a href="http://samucorvin.com" target="_blank">国产精品免费看久久久香蕉</a>| <a href="http://49234c.com" target="_blank">蜜臀va亚洲va欧美va天堂</a>| <a href="http://pppp95.com" target="_blank">亚洲午夜电影网</a>| <a href="http://guanghezixun.com" target="_blank">激情文学综合丁香</a>| <a href="http://9585865.com" target="_blank">欧美视频一区二区三区</a>| <a href="http://223zzz.com" target="_blank">久久米奇亚洲</a>| <a href="http://wanmajc.com" target="_blank">亚洲免费在线看</a>| <a href="http://www37999.com" target="_blank">亚洲精品午夜</a>| <a href="http://sdhanm.com" target="_blank">欧美成人免费小视频</a>| <a href="http://yunpiwang.com" target="_blank">午夜一级在线看亚洲</a>| <a href="http://669528.com" target="_blank">日韩视频在线永久播放</a>| <a href="http://rezel-zj.com" target="_blank">黄色亚洲大片免费在线观看</a>| <a href="http://jobmrleehxx.com" target="_blank">欧美啪啪一区</a>| <a href="http://www57669.com" target="_blank">另类成人小视频在线</a>| <a href="http://niu96.com" target="_blank">亚洲小说欧美另类社区</a>| <a href="http://72966t.com" target="_blank">欧美在线你懂的</a>| <a href="http://qcjpns.com" target="_blank">亚洲调教视频在线观看</a>| <a href="http://www-544778.com" target="_blank">亚洲福利在线视频</a>| <a href="http://457745.com" target="_blank">六十路精品视频</a>| <a href="http://wanyoulipin.com" target="_blank">久久国产天堂福利天堂</a>| <a href="http://www-333410.com" target="_blank">亚洲一区二区欧美日韩</a>| <a href="http://birhit.com" target="_blank">日韩系列在线</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>