摘要:
题目:输入一个字符串,打印出该字符串中字符的所有排列。例如输入字符串abc,则输出由字符a、b、c所能排列出来的所有字符串abc、acb、bac、bca、cab和cba。#include <iostream>#include <string>#include <cstring>using namespace std;bool isVisited[3];void dfs(string str, string rlt, const int len, int cur){ if(cur==len) { cout<<rlt<<endl; ret 阅读全文
posted @ 2012-05-04 10:56
Eric-Yang
阅读(175)
评论(0)
推荐(0)

浙公网安备 33010602011771号