首页 > TAG信息列表 > baa

B - One More aab aba baa

一道全排列的题,可以用dfs,也可以用stl内置的函数next_permutation dfs版本 #include <algorithm> #include <iostream> #include <vector> using namespace std; vector<string> c(41000); bool st[10]; int n, cnt; char b[10]; string a; void dfs(int m) { if (m &