摘要: Cube StackingTime Limit:2000MSMemory Limit:30000KTotal Submissions:16258Accepted:5579Case Time Limit:1000MSDescriptionFarmer John and Betsy are playing a game with N (1 #includeusing namespace std;#define maxn 30003int num[maxn];int dis[maxn]={0};int father[maxn];int find_set(int x){ if(x!=father[x] 阅读全文
posted @ 2013-07-08 19:48 myth_HG 阅读(185) 评论(0) 推荐(0)
摘要: #include #includeusing namespace std;int main(){ int r,n,ans,t; scanf("%d%d",&n,&r); if(n-r<r) r=n-r; ans = n; n=n-1; t=2; while(t<=r) { ans=ans*n/t; n--; t++; } printf("%d\n",ans); return 0;} 阅读全文
posted @ 2013-07-08 10:09 myth_HG 阅读(120) 评论(0) 推荐(0)