Skip to content

Commit 6695d68

Browse files
authored
Update main.cpp
1 parent 27ee44e commit 6695d68

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

main.cpp

+23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
1+
/**
2+
*
3+
* @Name : CombiningElements/main.cpp
4+
* @Version : 1.0
5+
* @Programmer : Max
6+
* @Date : 2019-06-25
7+
* @Released under : https://github.com/BaseMax/CombiningElements/blob/master/LICENSE
8+
* @Repository : https://github.com/BaseMax/CombiningElements
9+
*
10+
**/
111
#include <iostream>
212
#include <algorithm>
313
#include <string>
414

515
int main() {
16+
const int length=6;
17+
string inputs[length];
18+
for(int index=0;index < length;index++) {
19+
// cin >> inputs[index];
20+
getline(cin, inputs[index]);
21+
}
22+
sort(inputs, inputs+length);
23+
do {
24+
for(int index = 0; index < length; index++) {
25+
cout << inputs[index];
26+
}
27+
cout << endl;
28+
} while(next_permutation(inputs, inputs+length));
629
return 0;
730
}

0 commit comments

Comments
 (0)