Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <chrono>
- #include <iostream>
- #include <random>
- #include <vector>
- using namespace std;
- int main() {
- unsigned seed = chrono::system_clock::now().time_since_epoch().count();
- mt19937_64 generator(seed);
- uniform_int_distribution<int> dist(1, 500);
- vector<int> v;
- for (int i = 0; i < 10; i++) v.push_back(dist(generator));
- for (auto& e: v) cout << e << ' '; cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement