对拍

好像很多人不会写对拍

#include<cstdio>
#include<windows.h>
#include<iostream>
using namespace std;
int main()
{
    while(1)
    {
        system("a.exe > 1.in");//a为数据生成器 
        system("b.exe < 1.in > 1.out");//b、c为你的程序 
        system("c.exe < 1.in > 2.out");//所有程序不加freopen,且需要编译运行 
        if(system("fc 1.out 2.out"))break;//比较b,c运行的结果是否一样 
    }
    return 0;
 } 

 

posted @ 2017-09-04 20:47  lher  阅读(227)  评论(0编辑  收藏  举报