IO

namespace IO {
    
    const int S = 23;
    
    int rp = S;
    char buff[1 << S];
 
    char Get() {
        static bool eof = 0;
        if (rp == (1 << S)) {
            if (!fread(buff, 1, 1 << S, stdin)) eof = 1;
            rp = 0;
        }
        if (eof) return -1;
        return buff[rp++];
    }
 
    int Read() {
        char c;
        while (c = Get(), !isdigit(c));
        int x = c - 48;
        while (c = Get(), isdigit(c)) x = x * 10 + c - 48;
        return x;
    }
    
}
posted @ 2019-02-16 19:10  tkandi  阅读(125)  评论(0编辑  收藏  举报