数据生成器
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+4;
const int M = 10;
const int bias=0;
int rand_mod(){
return rand()%M+bias;
}
int main(){
struct _timeb T;
_ftime(&T);
srand(T.millitm);
freopen("in.txt","w",stdout);
int n=100;
cout<<n<<endl;
while(n--){
cout<<rand_mod()<<' ';
}
return 0;
}
对拍
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=10000;
while (n--) //一直循环,直到找到不一样的数据
{
system("gennerator.exe");
system("AC_test.exe");
system("hacker.exe");
if (system("fc ensure.txt ac_result.txt")) //当 fc 返回 1 时,说明这时数据不一样
break; //不一样就跳出循环
}
return 0;
}
https://www.lanqiao.cn/cup/group-activity/30/?channel_id=3