跳到正文

个人记录

数据生成器(别人的)

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

文章信息

发布
2023年4月20日
收录
2026年4月28日
更新
2026年11月9日
篇幅
约 1 分钟

版本

  1. v1当前

t是数据点个数,s是从那个数据点开始

C++
//makedata.h 2020.12.15
#include<bits/stdc++.h>
using namespace std;

ofstream infile,outfile;
int times=100,s=0;

void file(int tp){
	char inname[10],outname[11];
	infile.close();
	outfile.close();
	sprintf(inname,"game%02d.in",tp+s);
	sprintf(outname,"game%02d.out",tp+s);
	infile.open(inname);
	outfile.open(outname);
}

#define num(a,b) ((rand()*RAND_MAX+rand())%(a-b+1)+a)


int make(int tp){
}

int main(){
	srand(time(0));
	for(int tp=1;tp<=times;++tp){
	    file(tp);
	    make(tp);
	}
	return 0;
}
原文