摘要: 题目:排列问题,设R={r1,r2...rn}是要进行排列的n个元素,求R的全排列perm(R); a、递归关系 Ri=R-{ri} perm(R)=U(ri)perm(Ri) b、终止条件:n=1时 c、参数 int k,int m 代码如下: 运行结果如下: 阅读全文
posted @ 2016-09-13 21:15 茶飘香~ 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5869 Problem Description This is a simple problem. The teacher gives Bob a list of problems about 阅读全文
posted @ 2016-09-13 10:43 茶飘香~ 阅读(274) 评论(0) 推荐(0) 编辑