对拍

来源:互联网 发布:mac 预览 添加目录 编辑:程序博客网 时间:2024/03/29 02:44

原地址  ---------------------》》》》》》》》点击打开链接



对拍程序(windows)

2013年12月22日9722

a+b

zj.cpp

duipai.cpp

随机数生成器data.cpp

对拍程序a.cpp


 

将exe保存在同一个文件夹,运行对拍程序即可



我将以上对拍程序改了一下,输出改为txt,可以看到具体的数据如下



#include<iostream>#include<windows.h>using namespace std;int main(){    int t=100;    while(t--)    {        system("data > a+b.txt");        system("zj < a+b.txt > 1.txt");        system("duipai < a+b.txt > 2.txt");        if(system("fc 1.txt 2.txt"))   break;    }    system("pause");    return 0;}






0 0
原创粉丝点击