题目链接:http://ac.jobdu.com/problem.php?pid=1120
详解链接:https://github.com/zpfbuaa/JobduInCPlusPlus
参考代码:
// // 1120 全排列.cpp // Jobdu // // Created by PengFei_Zheng on 23/04/2017. // Copyright © 2017 PengFei_Zheng. All rights reserved. // #include <stdio.h> #include <iostream> #include <algorithm> #include <string.h> #include <cmath> #define MAX_SIZE 7 using namespace std; char str[MAX_SIZE]; char ans[MAX_SIZE]; bool used[MAX_SIZE]; int len; void prem(int x){ if(x == len){ ans[x]='