-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10098.cpp
More file actions
34 lines (33 loc) · 835 Bytes
/
10098.cpp
File metadata and controls
34 lines (33 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* ____
* ____ ___ ____ ________ __/ __/
* / __ `__ \/ __ `/ ___/ / / / /_
* / / / / / / /_/ / / / /_/ / __/
* /_/ /_/ /_/\__,_/_/ \__,_/_/
*
* @link : https://the-redback.com
*/
#include <bits/stdc++.h>
using namespace std;
#define inf 10000000
#define mem(a, b) memset(a, b, sizeof(a))
#define NN 100010
char a[100];
string s;
int main() {
// freopen("C:\\Users\\Maruf Tuhin\\Desktop\\in.txt","r",stdin);
// ios_base::sync_with_stdio(false);
int i, j, k, l, n, r, c, u, v, w;
int tc, t = 1, x = -1;
scanf("%d", &tc);
while (tc--) {
scanf("%s", &a);
l = strlen(a);
sort(a, a + l);
do {
puts(a);
} while (next_permutation(a, a + l));
puts("");
}
return 0;
}