摘要: 给定一个正整数n,1,2,...,n的全排列有n!种,按字典序从小到大,对于任意一个排列,给出它的下一个排列。如n=3,123的下一个排列为132。 代码: #include<stdio.h>#include<iostream>using namespace std;int n;int main() 阅读全文
posted @ 2016-03-22 08:54 寒燠 阅读(121) 评论(0) 推荐(0)