摘要:
Game of ConnectionsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2923Accepted Submission(s): 1649Problem DescriptionThis is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, ... , 2n - 1, 2n consecutively in clockwise 阅读全文
posted @ 2014-04-07 19:34
同学少年
阅读(161)
评论(0)
推荐(0)
摘要:
代码:#include #include using namespace std;int c[11][11];void init(){ memset(c,0,sizeof(c)); c[0][0]=c[1][0]=c[1][1]=1; for(int i=2;i<=10;i++) { c[i][0]=c[i][i]=1; for(int j=1;j<i;j++) c[i][j]=c[i-1][j]+c[i-1][j-1]; }}int main(){ init(); cout<<c[3][2]<<end... 阅读全文
posted @ 2014-04-07 16:50
同学少年
阅读(162)
评论(0)
推荐(0)
摘要:
排列组合Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2132Accepted Submission(s): 877Problem Description有n种物品,并且知道每种物品的数量。要求从中选出m件物品的排列数。例如有两种物品A,B,并且数量都是1,从中选2件物品,则排列有"AB","BA"两种。Input每组输入数据有两行,第一行是二个数n,m(1#include #include #incl 阅读全文
posted @ 2014-04-07 14:38
同学少年
阅读(229)
评论(0)
推荐(0)

浙公网安备 33010602011771号