标签:and ret space time ati stat void 无符号 unsigned
#include<bits/stdc++.h>
using namespace std;
#define random(a,b) ((a)+Curl_rand()%((b)-(a)+1))
static unsigned int randseed;
int n,cnt;
unsigned int Curl_rand(void)
{
unsigned int r;
/* 返回一个无符号32位整型的伪随机数. */
r = randseed = randseed * 1103515245 + 12345;
return (r << 16) | ((r >> 16) & 0xFFFF);
}
void Curl_srand(void)
{
/* 产生随机的伪随机数序列。 */
randseed = (unsigned int) time(NULL);
Curl_rand();
Curl_rand();
Curl_rand();
}
int main() {
Curl_srand();
}
标签:and ret space time ati stat void 无符号 unsigned
原文地址:https://www.cnblogs.com/greenty1208/p/10369059.html