摘要: 题意:给一个树组,长度为1,2,3。。。n ,求全排序里面第m小的序列。思路:调用库函数next_permutation 水过其中库中另一函数prev_permutation与next_permutation相反,由原排列得到字典序中上一次最近排列。69395642012-10-18 11:10:31Accepted102731MS260K306 BC++罗维View Code 1 #include <iostream> 2 #include <algorithm> 3 using namespace std; 4 5 int main() 6 { 7 int f[10 阅读全文
posted @ 2012-10-18 11:18 旅行的蜗牛 阅读(142) 评论(0) 推荐(0) 编辑