Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace chrono;
- int rand(int l, int r){
- static mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
- uniform_int_distribution<int> uid(l, r); return uid(rng);
- }
- auto start1 = high_resolution_clock::now();
- auto stop1 = high_resolution_clock::now();
- cout << setw(20) << "Estimated Time: " << duration_cast<microseconds>(stop1 - start1).count() / 1000000.0 << " uS\n";
Add Comment
Please, Sign In to add comment