锘??xml version="1.0" encoding="utf-8" standalone="yes"?>青青草原综合久久,国产三级精品久久,香蕉久久一区二区不卡无毒影院http://m.shnenglu.com/hoolee/archive/2012/09/06/189739.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Thu, 06 Sep 2012 12:39:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/06/189739.htmlhttp://m.shnenglu.com/hoolee/comments/189739.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/06/189739.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/189739.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/189739.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=3625
棰樻剰鎻忚堪錛氭湁n涓揣閿佺殑鎴塊棿鍜岃繖n涓埧闂撮棬涓婄殑n鎶婇挜鍖欙紝姣忎釜鎴塊棿涓殢鏈洪攣浜嗕竴鎶婇挜鍖欍備綘鍙互鐮村潖涓鎵囬棬錛屽彇鍑哄叾涓殑閽ュ寵錛屽皾璇曠敤閽ュ寵鎵撳紑鍙﹀鐨勯棬錛堢劧鍚庡彇鍑洪挜鍖欏幓鎵撳紑鍙﹀鐨勯棬錛屾垨鑰呮帴鐫鐮村潖鍙﹀鐨勯棬錛夈傛渶澶氬彲浠ョ牬鍧弅錛?lt;=n錛夋墖闂紝浣嗘槸絎竴鎵囬棬鍙兘鐢ㄩ挜鍖欐墦寮銆傛眰鎵鏈夐棬鑳借鎵撳紑錛堣鐮村潖錛屾垨鏄閽ュ寵鎵撳紑錛夌殑姒傜巼銆?br />浼犺涓殑絎竴綾繪柉鐗規灄鏁般?br />濡傛灉鐢╯[n][k]琛ㄧずn涓棬涓湁k涓幆鐨勬儏鍐墊暟錛屽垯鏈夛細
s[n][k] = s[n - 1][k - 1] + (n - 1) * s[n - 1][k], 1 <= k <= n - 1
涓婇潰鐨勫叕寮忓彲浠ヨ繖鏍風悊瑙o細褰撳墠n - 1涓棬緇勬垚k - 1涓幆鐨勬椂鍊欙紝鍐嶅姞鍏ョn涓棬褰㈡垚涓涓崟鐜嵆鍙紱褰搉 - 1涓棬緇勬垚k涓幆鏃訛紝瑕佸姞鍏ョn涓棬錛屼負浜嗕笉澧炲姞鐜殑涓暟錛屽彧闇瑕佸皢n鎻掑湪鍓峮 - 1涓棬鐨勪換鎰忎竴涓棬涔嬪悗鍗沖彲銆?br />鍒濆鍖栨儏鍐典負錛?br />s[i][0] = 0;
s[i][i] = 1, i >= 1
鍥犱負絎竴涓棬涓嶈兘鍦ㄧ幆涓紝鍙渶灝嗙涓涓棬鍦ㄧ幆涓殑鎯呭喌鍑忓幓錛屽嵆鏄痵[i][j] - s[i - 1][j - 1]鎵嶆槸鍚堟硶鐨勬儏鍐點?br />浠ヤ笅鏄唬鐮侊細


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define LEN 30
long long s[LEN][LEN];
int main()


{
int i, j;
int T;
int N, K;
scanf("%d", &T);
while(T--)

{
scanf("%d%d", &N, &K);
memset(s, 0, sizeof(s));
for(i = 0; i <= N; i++)// init
s[i][i] = 1;
for(i = 1; i <= N; i++)
for(j = 1; j <= i; j++)
s[i][j] = (i - 1) * s[i - 1][j] + s[i - 1][j - 1];
long long sum = 0;
long long base = 0;
for(i = 0; i <= K; i++)
sum += s[N][i] - s[N - 1][i - 1];
for(i = 0; i <= N; i++)
base += s[N][i];
double rs = 1.0 * sum / base;
printf("%.4lf\n", rs);
}
//system("pause");
return 0;
}


]]>- hdu3118Arbiterhttp://m.shnenglu.com/hoolee/archive/2012/09/04/189475.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 04 Sep 2012 14:39:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/04/189475.htmlhttp://m.shnenglu.com/hoolee/comments/189475.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/04/189475.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/189475.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/189475.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=3118
浜屽垎鍥劇殑鎬ц川錛氫竴涓浘鍗佷簩鍒嗗浘錛屽綋涓斾粎褰撳浘涓笉瀛樺湪濂囨暟鐜?br />鎶婄偣鍒嗘垚涓や釜闆嗗悎錛屾妸姣忎釜闆嗗悎涓浉榪炵殑杈瑰垹闄ゅ嵆鍙傛灇涓炬墍鏈夐泦鍚堬紝鎵懼嚭鍒犻櫎杈規渶灝忕殑閭d釜銆?


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define LEN 20
#define MAX 0xfffffff
int mp[LEN][LEN];
int N, M;
int rs;
int tt;
int gd[LEN];
void DFS(int n)


{
if(n >= N)

{
int i, j;
tt = 0;
for(i = 0; i < n; i++)
for(j = i + 1; j < n; j++)

{
if(gd[i] == gd[j])
tt += mp[i][j];
}
if(tt < rs)
rs = tt;
}
else

{
gd[n] = 1;
DFS(n + 1);
gd[n] = 0;
DFS(n + 1);
}
}
int main()


{
int i, j;
int T;
int x, y;
scanf("%d", &T);
while(T--)

{
scanf("%d%d", &N, &M);
memset(mp, 0, sizeof(mp));
for(i = 0; i < M; i++)

{
scanf("%d%d", &x, &y);
mp[x][y]++;
mp[y][x]++;
}
memset(gd, 0, sizeof(gd));
rs = MAX;
DFS(0);
printf("%d\n", rs);
}
//system("pause");
return 0;
}


]]> - hdu3127WHUgirlshttp://m.shnenglu.com/hoolee/archive/2012/09/04/189467.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 04 Sep 2012 13:34:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/04/189467.htmlhttp://m.shnenglu.com/hoolee/comments/189467.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/04/189467.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/189467.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/189467.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=3127
浜岀淮瀹屽叏鑳屽寘銆?br />鐪嬭繃鑳屽寘涔濊錛屾剰璇嗗埌鏈鏄儗鍖咃紝浣嗗紑濮嬫椂娌℃湁鎶婂姩鎬佹柟紼嬫病鏈夋悶娓呮銆?br />f[i][j]琛ㄧず闀縤瀹絡鐨勫竷鑳藉緱鍒扮殑鏈澶т環鍊箋?


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define LEN 15
#define LENF 1010
typedef struct


{
int x;
int y;
int c;
}Cut;
Cut ct[LEN];
int f[LENF][LENF];
int N, X, Y;
int Max2(int a, int b)


{
if(a < b)
a = b;
return a;
}
int main()


{
int i, j, k;
int T;
scanf("%d", &T);
while(T--)

{
scanf("%d%d%d", &N, &X, &Y);
for(i = 0; i < N; i++)
scanf("%d%d%d", &ct[i].x, &ct[i].y, &ct[i].c);
memset(f, 0, sizeof(f));
for(i = 1; i <= X; i++)
for(j = 1; j <= Y; j++)
for(k = 0; k < N; k++)

{
int x1 = ct[k].x;
int y1 = ct[k].y;
int c = ct[k].c;
if(i >= x1 && j >= y1)

{
f[i][j] = Max2(f[i][j], f[i - x1][j] + f[x1][j - y1] + c);
f[i][j] = Max2(f[i][j], f[i - x1][y1] + f[i][j - y1] + c);
}
x1 = ct[k].y;
y1 = ct[k].x;
if(i >= x1 && j >= y1)

{
f[i][j] = Max2(f[i][j], f[i - x1][j] + f[x1][j - y1] + c);
f[i][j] = Max2(f[i][j], f[i - x1][y1] + f[i][j - y1] + c);
}
}
printf("%d\n", f[X][Y]);
}
//system("pause");
return 0;
}


]]> - hdu3125Slashhttp://m.shnenglu.com/hoolee/archive/2012/09/04/189462.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 04 Sep 2012 11:57:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/04/189462.htmlhttp://m.shnenglu.com/hoolee/comments/189462.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/04/189462.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/189462.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/189462.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=3125
瀛楃涓插鐞嗙殑姘撮~~


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define LEN 100
char str[LEN];
int len;
int isURL()


{
int i;
for(i = 0; i < len; i++)

{
if(str[i] == ':')
break;
}
if((str[i + 1] == '/' || str[i + 1] == '\\') && (str[i + 2] == '/' || str[i + 2] == '\\'))
return 1;
return 0;
}
int isUnix()


{
if(str[0] == '/' || str[0] == '\\')
return 1;
return 0;
}
int isW()


{
int i;
for(i = 0; i < len; i++)

{
if(str[i] == ':')
break;
}
if(str[i + 1] == '/' || str[i + 1] == '\\')

{
if(str[i + 2] == '/' || str[i + 2] == '\\')
return 0;
return 1;
}
return 0;
}
int main()


{
int i, j;
int T;
scanf("%d", &T);
getchar();
while(T--)

{
gets(str);
len = strlen(str);
if(isURL())

{
printf("It's a URL!\n");
for(i = 0; i < len; i++)

{
if(str[i] == '\\')
putchar('/');
else
putchar(str[i]);
}
}
else if(isUnix())

{
printf("It's a path in Unix-like systems!\n");
for(i = 0; i < len; i++)
if(str[i] == '\\')
putchar('/');
else
putchar(str[i]);
}
else if(isW())

{
printf("It's a path in Windows system!\n");
for(i = 0; i < len; i++)
if(str[i] == '/')
putchar('\\');
else
putchar(str[i]);
}
putchar(10);
//printf("\n");
}
//system("pause");
return 0;
}


]]> - hdu3123GCChttp://m.shnenglu.com/hoolee/archive/2012/09/04/189457.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Tue, 04 Sep 2012 11:34:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/04/189457.htmlhttp://m.shnenglu.com/hoolee/comments/189457.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/04/189457.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/189457.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/189457.htmlhttp://acm.hdu.edu.cn/showproblem.php?pid=3123
綰補鐨勬暟瀛﹂錛屽綋n>m鏃跺氨娌″繀瑕佸啀璁$畻浜嗭紝鍥犱負涓嬮潰鐨勬暟妯閮界瓑浜?


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define LEN 200
int main()


{
//printf("len = %d\n", getLen(100));
int i, j;
int T;
int n, m;
char str[LEN];
long long rs;
long long multi;
scanf("%d", &T);
while(T--)

{
scanf("%s%d", str, &m);
int len1 = strlen(str);
if(len1 > 7)
n = m;
else
sscanf(str, "%d", &n);
if(n == 0)

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

{
rs = 1;
multi = 1;
for(i = 1; i <= n; i++)

{
multi = (multi * i) % m;
rs = (rs + multi) % m;
}
printf("%lld\n", rs % m);
}
}
//system("pause");
return 0;
}


]]> - bnuoj3016--Dramatic Multiplicationshttp://m.shnenglu.com/hoolee/archive/2012/09/01/189026.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sat, 01 Sep 2012 09:36:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/01/189026.htmlhttp://m.shnenglu.com/hoolee/comments/189026.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/01/189026.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/189026.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/189026.html


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define LEN 3000
int main()


{
int i, j;
int T;
int n, k;
scanf("%d", &T);
int n0[LEN];
int n1[LEN];
while(T--)

{
scanf("%d%d", &n, &k);
int t = 0;
int t1;
n0[0] = k;
int len = LEN - 10;
int gard = 0;
for(i = 0; i < len; i++)

{
t1 = n0[i] * n + t;
n1[i] = t1 % 10;
t = t1 / 10;
n0[i + 1] = n1[i];
if(n1[i] == k && t == 0 && n1[i - 1] != 0)//緇撴灉鏁板瓧涓嶈兘鏈夊墠瀵?錛屽茍涓旀渶楂樹綅涓嶈兘鏈夎繘浣?/span>

{
gard = 1;
break;
}
}
if(n == 1)//n涓?鐨勬椂鍊欏彧闇瑕佺洿鎺ヨ緭鍑簁錛岃屼笂闈or()鐨勭粨鏋滀細杈撳嚭涓や釜k
printf("%d\n", k);
else

{
if(gard == 1)

{
for(; i >= 0; i--)
printf("%d", n0[i]);
putchar(10);
}
else
printf("0\n");
}
}
//system("pause");
return 0;
}


]]> - bnuoj3013--Ancient Keyboardhttp://m.shnenglu.com/hoolee/archive/2012/09/01/188992.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sat, 01 Sep 2012 03:11:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/01/188992.htmlhttp://m.shnenglu.com/hoolee/comments/188992.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/01/188992.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/188992.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/188992.htmlhttp://www.bnuoj.com/bnuoj/contest_show.php?cid=926#problem/9911
瀵規ā鎷熼涓嶅お鎰熷啋錛岃繖閬撻鎼炰簡濂戒箙錛屾劅璋㈠皬鐒~
緗戦夊湪鍗籌紝涓鍛ㄧ殑鍔犲己璁粌椹笂灝辮榪囧幓浜嗭紝鐫鎬ュ晩錛岀潃鎬ュ晩錛侊紒


#include<stdio.h>
#include<stdlib.h>
#define LEN
typedef struct


{
char c;
int a, b;
}Node;
int main()


{
int i, j;
int T, n;
Node nd[1000];
int min = 0xfffffff;
int max = -1;
scanf("%d", &T);
while(T--)

{
scanf("%d", &n);
for(i = 0; i < n; i++)

{
getchar();
scanf("%c%d%d", &nd[i].c, &nd[i].a, &nd[i].b);
if(nd[i].a < min)
min = nd[i].a;
if(nd[i].b > max)
max = nd[i].b;
}
int count = 0;
for(i = min; i <= max; i++)

{
for(j = 0; j < n; j++)

{
if(nd[j].a == i)
count++;
if(nd[j].b == i)
count--;
}
if(count)
printf("%c", count + 'A' - 1);
}
printf("\n");
}
//system("pause");
}


]]> - bnuoj3017--Entertainmenthttp://m.shnenglu.com/hoolee/archive/2012/09/01/188990.html灝忛紶鏍?/dc:creator>灝忛紶鏍?/author>Sat, 01 Sep 2012 03:05:00 GMThttp://m.shnenglu.com/hoolee/archive/2012/09/01/188990.htmlhttp://m.shnenglu.com/hoolee/comments/188990.htmlhttp://m.shnenglu.com/hoolee/archive/2012/09/01/188990.html#Feedback0http://m.shnenglu.com/hoolee/comments/commentRss/188990.htmlhttp://m.shnenglu.com/hoolee/services/trackbacks/188990.html#inc... 闃呰鍏ㄦ枃

]]>
无码乱码观看精品久久|
国产精品18久久久久久vr|
久久久人妻精品无码一区|
色综合久久夜色精品国产|
久久精品国产清高在天天线|
国产精品99久久免费观看|
久久99精品国产麻豆蜜芽|
色老头网站久久网|
精品久久久久久国产|
亚洲伊人久久综合影院|
久久这里只精品国产99热|
久久久久免费视频|
久久99国产乱子伦精品免费|
欧美久久一级内射wwwwww.|
国内精品久久久久影院日本|
日批日出水久久亚洲精品tv|
国产精品美女久久久久网|
2021国产精品午夜久久|
久久伊人五月天论坛|
91精品国产色综久久|
久久精品国产亚洲77777|
久久精品卫校国产小美女|
久久久久久久综合综合狠狠|
国产一级做a爰片久久毛片|
久久亚洲精精品中文字幕|
中文国产成人精品久久亚洲精品AⅤ无码精品|
久久久久久国产精品免费无码|
亚洲欧洲中文日韩久久AV乱码|
99久久无码一区人妻|
91精品免费久久久久久久久|
波多野结衣中文字幕久久|
精品熟女少妇a∨免费久久|
日日躁夜夜躁狠狠久久AV|
精品久久久无码人妻中文字幕|
无码任你躁久久久久久老妇|
久久亚洲AV无码西西人体|
日韩欧美亚洲综合久久影院Ds|
亚洲美日韩Av中文字幕无码久久久妻妇
|
国产亚洲欧美精品久久久|
久久精品久久久久观看99水蜜桃
|
久久受www免费人成_看片中文|