Gen is now based on current milliseconds, not seconds
This commit is contained in:
parent
c73d5c9ba4
commit
10c52ebec9
1 changed files with 4 additions and 1 deletions
5
gen.cpp
5
gen.cpp
|
@ -1,10 +1,13 @@
|
|||
#include "global.hpp"
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <chrono>
|
||||
|
||||
using namespace std::chrono;
|
||||
|
||||
|
||||
vector<int> generate(int N, int M) {
|
||||
srand((unsigned)time(0));
|
||||
srand(duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count());
|
||||
|
||||
auto r = vector<int>(N, 0);
|
||||
for(int n = 0; n < N; n++)
|
||||
|
|
Loading…
Reference in a new issue