对拍

首先,你需要将要对拍的cpp:ex1 ex2写出来

在写一个生成数据cpp ex3

当然是rand()与随机化种子srand(time(0))

然后建一个文件夹,将上面三个程序的exe扔进去

新建一个txt

内容如下

:again
ex3>input.txt
ex1<input.txt>ex1_out.txt
ex2<input.txt>ex2_out.txt
fc ex1_out.txt ex2_out.txt
if not errorlevel 1 goto again
pause

当然输入输出txt让他自己生成QwQ

将你新建的txt文件扩展名改为bat

click it,yun xing

posted @ 2019-08-17 16:43  凉如水  阅读(90)  评论(0编辑  收藏  举报