zoukankan      html  css  js  c++  java
  • 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
    }
    

      

  • 相关阅读:
    求所有科目都大于80分的学生姓名
    sql server如何设置密码过期时间呢?
    sql server官网使用查找技术文档(msdn、联机丛书)
    【版本特性】sql server2014版本特性
    SQLSERVER文件组误脱机后如何联机
    sql server2014中的内存优化表/内存表(续写)
    JNI日志调试LOG和中文乱码
    JNI常见错误整理
    什么是“软解码”,什么又是“硬解码”呢?
    创建eclipse针对NDK的联合编译环境。
  • 原文地址:https://www.cnblogs.com/invisible/p/2776255.html
Copyright © 2011-2022 走看看