随机生成整数序列:
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int ra(int mo)
{
return 1ll * rand() * rand() % mo; }
int main()
{
srand(time(0));
int n = ra(100000) + 1;
int m = 1000000000;
for(int i = 1 ; i <= n ; i ++)
a[i] = ra(2 * m + 1) - m;
return 0;
}
随机生成区间列:
#include<bits/stdc++.h>
using