fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. int main()
  6. {
  7. std::vector<int> guesses(100);
  8. std::generate(guesses.begin(), guesses.end(), [&](){static int count = 1; return count++;});
  9. std::random_shuffle(guesses.begin(), guesses.end());
  10.  
  11. for(int const &it : guesses)
  12. {
  13. std::cout << it << ' ';
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
93 52 12 70 25 36 18 37 27 99 68 40 84 3 76 57 60 19 33 41 92 87 58 13 15 43 28 63 64 59 31 97 14 69 4 88 72 65 10 23 67 81 21 80 90 82 74 1 95 42 89 29 53 44 17 61 50 8 85 73 30 62 7 46 54 77 9 34 38 16 26 56 71 32 83 48 49 11 91 35 24 75 78 20 86 45 94 55 98 2 39 96 5 22 100 6 79 66 51 47