HDU 3811 Permutation 记忆化搜索 状态压缩 DP
摘要:
题意:求1-N的排列数但是有限定条件,AI,BI,该排列要满足第AI位为Bi。算法:1.裸的DFS果断TLE。。时间复杂度为N!View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>us 阅读全文
posted @ 2012-08-05 11:25 more think, more gains 阅读(170) 评论(0) 推荐(0) 编辑