#include<bits/stdc++.h>
using namespace std;
#define ll long long
map<ll,ll>mp;
ll random(ll mod1,ll mod2){
ll mod=(mod2-mod1+1);
ll n1, n2, n3, n4, ans;
n1 = rand();
n2 = rand();
n3 = rand();
n4 = rand();
ans = n1 * n2 % mod;
ans = ans * n3 % mod;
ans = ans * n4 % mod;
return ans+mod1;
}
int main(){
ios::sync_with_stdio(0);
cout.tie(0);
srand((unsigned)time(0));
freopen("make.txt","w",stdout);
ll n=1e6;
ll m=1e6;
cout<<n<<" "<<m<<endl;
for(int i=1;i<=n;i++){
ll x=random(1,1e6-i);
cout<<x<<' ';
}
cout<<endl;
for(int i=1;i<=n;i++){
ll x=random(1,1000);
cout<<x<<' ';
}
cout<<endl;
for(int i=1;i<=m;i++){
cout<<random(1,n)<<' '<<random(1,n-1000)<<endl;
}
//fclose(stdout);
return 0;
}
这是我的造数据代码,但是在n,m=1e6的时候输出的txt就不全,不知道为什么,求大佬指点