1 条题解
-
0YOU (youzhenrong) LV 6 @ 2024-11-10 19:49:12
#include <algorithm> #include <bitset> #include <cctype> #include <cerrno> #include <clocale> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <exception> #include <fstream> #include <functional> #include <limits> #include <list> #include <map> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <utility> #include <vector> #include <cwchar> #include <cwctype> #include <complex.h> #include <fenv.h> #include <inttypes.h> #include <stdbool.h> #include <stdint.h> #include <tgmath.h> #include <windows.h> using namespace std; #define LL long long const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; char a[N] , box[N]; bool v[N]; int len; void dfs(int step){ if(step == len){ cout << box << endl; return; } for(int i = 0;i < len;i++){ if(!v[i]){ v[i] = 1; box[step] = a[i]; dfs(step + 1); v[i] = 0; } } } int main() { cin >> a; len = strlen(a); dfs(0); return 0; }
- 1
信息
- ID
- 1239
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 60
- 已通过
- 22
- 上传者