zoukankan      html  css  js  c++  java
  • 对拍程序

    代码1

    #include<iostream>
    using namespace std;
    int main()
    {
        int a,b;
        cin>>a>>b;
        cout<<a+b<<endl;
    //    system("pause");
        return 0;
    }

    代码2

    #include<iostream>
    using namespace std;
    int main()
    {
        int a,b;
        cin>>a>>b;
        while(b--) a++;
        cout<<a<<endl;
    //    system("pause");
        return 0;
    }

    datamaker

    #include<iostream>
    #include<ctime>
    #include<cstdlib>
    using namespace std;
    int main()
    {
    srand(time(0));
    int a,b;
    a=rand();
    b=rand();
    cout<<a<<' '<<b<<endl;
    //system("pause");
    return 0;
    }

    对拍

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

    把exe文件放在一个文件夹内,然后运行对拍文件

  • 相关阅读:
    安卓输入法
    android问题
    速查
    Iphone幻灯片效果+背景音乐
    MBProgressHUD使用
    画图
    textmate 的快捷键
    设置Table Cell的背景图的类
    Objectc 一些代码规范
    效果收集
  • 原文地址:https://www.cnblogs.com/qscqesze/p/4442527.html
Copyright © 2011-2022 走看看