compile failed fix

master
Emojigit 2021-04-08 12:53:22 +08:00
parent 009eab6195
commit 7cc78abab6
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@
using namespace std;
int random_num(int lo,int hi) { // contributed by a_k_n, https://www.cplusplus.com/forum/general/107917/
srand(chrono::system_clock::now());
struct timeval time_now{};
gettimeofday(&time_now, nullptr);
srand(time_now.tv_usec);
return rand()%(hi-lo) + lo;
}