对拍技巧

对拍程序:

#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;
}

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

就行了

猜你喜欢

转载自www.cnblogs.com/linda-fcj/p/9164785.html