版本比较
造数据代码
正文
增加 8 行删除 8 行
6 行未改动789101111121314153 行未改动192021222323242526272829303132333430313233343536373839394041426 行未改动
//可修改数据名string name = "data", in = ".in", out = ".out";void work(int z);random_device rd; random_device rd;mt19937 gen(rd());ofstream rout, wout;
string getPath(int n, string io) {3 行未改动}ll brand() { uniform_int_distribution<ll> dist(0, numeric_limits<ll>::max()); return dist(gen);} }double drand() { normal_distribution<double> dist(0.0, 3.0); return dist(gen);}int main() { for (int z = 1; z <= 10; z++) { //可修改次数 remove(getPath(z, in).c_str()), rout.open(getPath(z, in), ios_base::app); remove(getPath(z, out).c_str()), wout.open(getPath(z, out), ios_base::app); work(z); cout << "data " << z << " succeed!" << endl; rout.close(), wout.close(); remove(getPath(z, in).c_str()), rout.open(getPath(z, in), ios_base::app); remove(getPath(z, out).c_str()), wout.open(getPath(z, out), ios_base::app); work(z); cout << "data " << z << " succeed!" << endl; rout.close(), wout.close(); }}//可修改代码void work(int z) {
return;}```