From 10c52ebec999e2ec7b58e8f246ea4df069da1bf5 Mon Sep 17 00:00:00 2001 From: Matuush Date: Thu, 26 Dec 2024 23:30:39 +0100 Subject: [PATCH] Gen is now based on current milliseconds, not seconds --- gen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen.cpp b/gen.cpp index 8f787f6..6b603c7 100644 --- a/gen.cpp +++ b/gen.cpp @@ -1,10 +1,13 @@ #include "global.hpp" #include #include +#include + +using namespace std::chrono; vector generate(int N, int M) { - srand((unsigned)time(0)); + srand(duration_cast(system_clock::now().time_since_epoch()).count()); auto r = vector(N, 0); for(int n = 0; n < N; n++)