排列组合-组合
悠小白
这个作者很懒,什么都没留下…
展开
-
ACM排列组合-组合
利用杨辉三角实现求组合数,模板代码(实际为利用二维数组打印杨辉三角):#include<stdio.h> int main(){ int n,i,j,a[35][35]; while(scanf("%d",&n)!=EOF){ for(i=0;i<n;i++) a[i][0]=a[i][i]=1; f...原创 2018-05-17 23:04:41 · 925 阅读 · 0 评论 -
HDU2049-不容易系列之(4)——考新郎
http://acm.hdu.edu.cn/showproblem.php?pid=2049 #include<iostream> #include<cstdio> typedef unsigned long long ll; using namespace std; ll f[25]; ll solve(int x,int y){ ll s1=1,s2=1...原创 2018-08-15 21:48:27 · 133 阅读 · 0 评论 -
HDU2068-RPG的错排
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2068 #include<iostream> #include<cstdio> using namespace std; typedef unsigned long long ll; ll f[30],a[30][30]; int main(){ for(int ...原创 2018-08-23 18:10:33 · 125 阅读 · 0 评论