跳到正文

科技·工程

How to make data

mo_mo_yu0_0约 1 分钟
原文
文章信息与版本

文章信息

发布
2026年4月22日
收录
2026年5月9日
更新
2026年9月24日
篇幅
约 1 分钟

版本

  1. v1当前
C++
mt19937 rd(time(0));
int rands(int l,int r){
	int Len=(r-l+1);
	return rd()%Len+l;
}
void Run(string str,int L,int R){
	for(int test=L;test<=R;test++){
		string tmp=to_string(test);
		string s;
		if(tmp.size()==1)s=str+"00"+tmp;
		else if(tmp.size()==2)s=str+"0"+tmp;
		else s=str+tmp;
		freopen((s+".in").c_str(),"w",stdout);
		in();
		freopen("CON","w",stdout);
		freopen((s+".in").c_str(),"r",stdin);
		freopen((s+".out").c_str(),"w",stdout);
		out();
		freopen("CON","r",stdin);
		freopen("CON","w",stdout);
	}
}
原文