• OJ做题框架


    /*
    in windows
    the fc tool is so ugly!
    */
    #include <cctype>
    #include <cstdio>
    #include <cstring>
    #include <cstdlib>
    #include <cassert>
    #include <map>
    #include <list>
    #include <set>
    #include <queue>
    #include <vector>
    #include <sstream>
    #include <iterator>
    #include <iostream>
    #include <algorithm>
    using namespace std;
    const int msize = 100860;
    
    inline void init()
    {
    }
    
    inline bool input()
    {
        if ()
        {
            return true;
        }
        return false;
    }
    
    
    void process()
    {
    
    }
    
    inline void output()
    {
    
    }
    
    void localstream();
    void localjudge();
    
    int main()
    {
        localstream();
    
        do
        {
            init();
            if (!input())
                break;
            process(iorder, porder, 0);
            output();
        }
        while (true);
    
        localjudge();
        return 0;
    }
    
    inline void localstream()
    {
    #ifndef ONLINE_JUDGE
        assert(freopen("in.txt", "r", stdin) != NULL);
        assert(freopen("out.txt", "w", stdout) != NULL);
    #endif
    }
    
    inline void localjudge()
    {
    #ifndef ONLINE_JUDGE
        fclose(stdout);
        assert(freopen("CON", "w", stdout) != NULL);
        system("fc /a std.txt out.txt");
        cout << endl;
    #endif
    }
    

      

    /*
    in linux
       */
    #include <cctype>
    #include <cstdio>
    #include <cstring>
    #include <cstdlib>
    #include <cassert>
    #include <map>
    #include <list>
    #include <set>
    #include <queue>
    #include <vector>
    #include <sstream>
    #include <iterator>
    #include <iostream>
    #include <algorithm>
    using namespace std;
    const int msize = 100860;
    
    inline void init()
    {
    }
    
    inline bool input()
    {
        if ()
        {
            return true;
        }
        return false;
    }
    
    
    void process()
    {
    
    }
    
    inline void output()
    {
    
    }
    
    void localstream();
    void localjudge();
    
    int main()
    {
        localstream();
    
        do
        {
            init();
            if (!input())
                break;
            process(iorder, porder, 0);
            output();
        }
        while (true);
    
        localjudge();
        return 0;
    }
    
    void localstream()
    {
    #ifndef ONLINE_JUDGE
        assert(freopen("in", "r", stdin) != NULL);
        assert(freopen("out", "w", stdout) != NULL);
    #endif
    }
    
    void localjudge()
    {
    #ifndef ONLINE_JUDGE
        fclose(stdout);
        assert(freopen("/dev/tty", "w", stdout) != NULL);
        system("diff std out");
    #endif
    }
    

      

  • 相关阅读:
    HDU1542矩形面积并
    HDU5869树状数组+gcd预处理
    HDU5845 Best Division
    整体二分
    Lattice 的 Framebuffer IP核使用调试笔记之datasheet笔记
    DDR3详解(以Micron MT41J128M8 1Gb DDR3 SDRAM为例)
    ISD1700系列多段语音录放系列
    Lattice Diamond 学习之编译、检查和设置约束
    欧拉函数的几个性质及证明
    CF776B Sherlock and his girlfriend
  • 原文地址:https://www.cnblogs.com/invisible/p/2776255.html
Copyright © 2020-2023  润新知