对拍板子

//linux背景下
#include<bits/stdc++.h>
using namespace std;
int main(){
    int tot=0;    
    system("g++ a.cpp -o a;g++ 1.cpp -o 1;g++ data.cpp -o data");
    while(1){
        printf("# %d  ------>",++tot);
        system("./data > in");
        system("./a < in > a.out");
        system("./1 < in > 1.out");
        if(system("diff a.out 1.out")){
            system("notify-send 'WA'");
            puts("WA");
            return 0;
        }
        puts("AC ");
    }
}

 

 
posted @ 2020-06-15 17:06  sodak  阅读(207)  评论(0编辑  收藏  举报