zoukankan      html  css  js  c++  java
  • 模板 输入输出优化

    inline int read() {
        char ch, c=' ';
        int res;
        while (ch = getchar(), ch < '0' || ch>'9') c = ch;
        res = ch - 48;
        while (ch = getchar(), ch >= '0' && ch <= '9') res = (res << 3) + (res << 1) + ch - 48;
        return c == '-' ? -res : res;
    }
    
    void write(int x) {
        if (x < 0)     putchar('-'), x = -x;
        if (x > 9) write(x / 10);
        putchar(x % 10 + '0');
        return;
    }
    inline int read() {
        char ch, c;
        int res;
        while (ch = getchar(), ch < '0' || ch>'9') c = ch;
        res = ch - 48;
        while (ch = getchar(), ch >= '0' && ch <= '9') res = (res << 3) + (res << 1) + ch - 48;
        return c == '-' ? -res : res;
    }
    
    void write(int x) {
        if (x < 0)     putchar('-'), x = -x;
        if (x > 9) write(x / 10);
        putchar(x % 10 + '0');
        return;
    }
  • 相关阅读:
    CentOS/RHEL 查看用户登陆信息
    PAM
    块存储
    ECS
    SQL 基础应用
    MySQL 基础管理
    MySQL 体系结构
    JSON对象
    设置dom节点属性的代码优化
    Ext框架下的元素拖动
  • 原文地址:https://www.cnblogs.com/hznumqf/p/12298936.html
Copyright © 2011-2022 走看看