First, this is a Python script
Import os;for I in range (0,20): print ("Case:" +str (i)); Print ("randoming"); Os.system ("Randomdata.exe"); Print ("Running right mod"); Os.system ("Right.exe"); Print ("Running my mod"); Os.system ("My.exe"); Print ("Checking files"); Os.system ("Check.exe" +str (i+1)); Os.system ("pause");
Os.system (order)--is equivalent to entering the order string under CMD.
Put the script in the specified folder
And then put
randomdata.exe--randomly generated data
right.exe--is generally a program to determine the correctness of the algorithm
my.exe--Self-validating program
checking.exe--Procedures for verifying two program answers
Randomdata.exe the generated input files in the Input.txt in the same folder.
Right.exe accepts input.txt as input and then outputs the run result to output.txt.
My.exe accepts input.txt as input and outputs the result to my.txt.
Check.exe accepts input.txt,output.txt as input and compares output results to log.txt.
By the way, check output to log is
Ofstream OutFile ("Log.txt", Ios_base::app);
In this case, each run output to log inside will add the current comparison of records, remember to save the wrong input file.
You can create a inputs folder, and then store it directly in the store.
Pass the run example number to the check using int main (int argc,char *argv)
Each time you save the running file, just use this to construct a new file name.
String filename=argv[1];
filename+= ". txt";
So you can.
Python Script-based alignment debug