对拍技巧

对拍程序:

 

#include <bits/stdc++.h>
using namespace std;

int main()
{
    while(1)
    {
        system("./data > data.in");
        system("./std < data.in > std.out");
        system("./brute < data.in > brute.out");
        if(system("diff std.out brute.out"))
        {
            printf("WA\n");
            break;
        }
        else printf("AC\n");
    }while(1);
    return 0;
}

 

  

 

编译一下四个程序,运行对拍程序:

就行了

 

posted @ 2018-06-10 22:34  Captain_fcj  阅读(180)  评论(0编辑  收藏  举报