![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
组合
文章平均质量分 83
guojiaqi007
这个作者很懒,什么都没留下…
展开
-
九度 oj 题目1044:Pre-Post (确定树的状态)
http://ac.jobdu.com/problem.php?pid=1044参考了1.http://blog.csdn.net/yangnanhai93/article/details/406585712.http://www.acmerblog.com/jiudu-1044-2225.html#include #include static int C[22][2转载 2017-02-06 17:03:32 · 572 阅读 · 0 评论 -
九度 oj 题目1038:Sum of Factorials
http://ac.jobdu.com/problem.php?pid=1038这道题首先想到用组合数,如果要列出完整的组合内容应考虑到用所有组合, 所有排列的模板。如果只是要组合的和(或者积)就相当于二叉搜索,中途还可以剪枝。code1:#include static int f[11];static int n;void make_f(){ f[0] =原创 2017-02-07 10:40:04 · 343 阅读 · 0 评论 -
所有组合, 所有排列的模板(从n个数中选m个数的所有组合和所有排列)
参考了 http://www.acmerblog.com/combinations-of-r-elements-6059.html#include #include void combine(int arr[], int data[], int start, int end,int idx,int r){ // has found r elements if(原创 2017-01-17 11:07:33 · 443 阅读 · 0 评论