fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. #include <iterator>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. vector<int> array = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  10. random_shuffle(array.begin(), array.end());
  11. copy(array.begin(), array.end(), ostream_iterator<int>(cout, "\n"));
  12. return 0;
  13. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
4
3
7
8
0
5
2
1
6
9