对拍

#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\n",ed-st);}
    return 0;
}

 

posted @ 2020-07-13 16:54  _LH2000  阅读(93)  评论(0编辑  收藏  举报