#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
/*纳秒级 随机性更强,远胜过time(0)*/
struct timeval tpstart;
gettimeofday(&tpstart,NULL);
srand(tpstart.tv_usec);
int rd = rand();
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
/*纳秒级 随机性更强,远胜过time(0)*/
struct timeval tpstart;
gettimeofday(&tpstart,NULL);
srand(tpstart.tv_usec);
int rd = rand();