-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (29 loc) · 669 Bytes
/
main.cpp
File metadata and controls
30 lines (29 loc) · 669 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
/**
*
* @Name : CombiningElements/main.cpp
* @Version : 1.0
* @Programmer : Max
* @Date : 2019-06-25
* @Released under : https://github.com/BaseMax/CombiningElements/blob/master/LICENSE
* @Repository : https://github.com/BaseMax/CombiningElements
*
**/
#include <iostream>
#include <algorithm>
#include <string>
int main() {
const int length=6;
string inputs[length];
for(int index=0;index < length;index++) {
// cin >> inputs[index];
getline(cin, inputs[index]);
}
sort(inputs, inputs+length);
do {
for(int index = 0; index < length; index++) {
cout << inputs[index];
}
cout << endl;
} while(next_permutation(inputs, inputs+length));
return 0;
}