fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. vector<bool> data(8, false);
  9. data[7] = data[6] = data[5] = true;
  10. do {
  11. for (int i = 0 ; i != data.size() ; i++) {
  12. cout << (int)data[i];
  13. }
  14. cout << endl;
  15. } while (next_permutation(data.begin(), data.end()));
  16. return 0;
  17. }
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
00000111
00001011
00001101
00001110
00010011
00010101
00010110
00011001
00011010
00011100
00100011
00100101
00100110
00101001
00101010
00101100
00110001
00110010
00110100
00111000
01000011
01000101
01000110
01001001
01001010
01001100
01010001
01010010
01010100
01011000
01100001
01100010
01100100
01101000
01110000
10000011
10000101
10000110
10001001
10001010
10001100
10010001
10010010
10010100
10011000
10100001
10100010
10100100
10101000
10110000
11000001
11000010
11000100
11001000
11010000
11100000