小技巧—Windows下对拍

小技巧—Windows下对拍

之前展示了一波Linux下对拍,现在换Windows下的。

模板:

#include<bits/stdc++.h>
using namespace std;
int main()
{
	for(int i=1;i<=20;i++)
	{
		system("data.exe");
		double beg=clock();
		system("test.exe");
		double end=clock();
		system("vio.exe");
		if(system("fc vio.out test.out"))
		{
			printf("WA on testdata#%d
",i);
			return 0;
		}
		else
			printf("AC on testdata#%d Time:%.2lf
",i,end-beg);
	}
	return 0;
}
原文地址:https://www.cnblogs.com/fusiwei/p/13905108.html