对拍

#include<cstdio>
#include<cstdlib>
#include<ctime>
//标准程序加  读入 输出 
//  freopen("radom.txt","r",stdin);    
//    ofstream fout("test.txt");
//    streambuf* pOld=cout.rdbuf(fout.rdbuf());

//暴力程序加 读入 输出  
//  freopen("radom.txt","r",stdin);    
//    ofstream fout("bl.txt");
//    streambuf* pOld=cout.rdbuf(fout.rdbuf());


int main()
{   long s,t;
 //       system("C:\random.exe");//随机数 
        double st=clock();
        system("bl.exe");//朴素 
        double ed=clock();
        system("test.exe");//正解 
        if(system("fc test.txt bl.txt")){puts("Wrong Answer"); return 0;}
        else{printf("Accepted, 用时 %.0lfms
",ed-st);}
    return 0;
}
rush!
原文地址:https://www.cnblogs.com/LH2000/p/13294157.html