zoukankan      html  css  js  c++  java
  • 超神输入外挂io

    这个暂时没有整理好,敬请期待。。。。

    -------------------分割线-------------------

     1 #include <cstdio>
     2 using namespace std;
     3 namespace fastIO {
     4     #define BUF_SIZE 100000
     5     //fread -> read
     6     bool IOerror = 0;
     7     inline char nc() {
     8         static char buf[BUF_SIZE], *p1 = buf + BUF_SIZE, *pend = buf + BUF_SIZE;
     9         if(p1 == pend) {
    10             p1 = buf;
    11             pend = buf + fread(buf, 1, BUF_SIZE, stdin);
    12             if(pend == p1) {
    13                 IOerror = 1;
    14                 return -1;
    15             }
    16         }
    17         return *p1++;
    18     }
    19     inline bool blank(char ch) {
    20         return ch == ' ' || ch == '
    ' || ch == '
    ' || ch == '	';
    21     }
    22     inline void read(int &x) {
    23         char ch;
    24         while(blank(ch = nc()));
    25         if(IOerror)
    26             return;
    27         for(x = ch - '0'; (ch = nc()) >= '0' && ch <= '9'; x = x * 10 + ch - '0');
    28     }
    29     #undef BUF_SIZE
    30 };
    31 using namespace fastIO;
    32 int a,b;
    33 int main()
    34 {
    35     read(a);
    36     read(b);
    37     printf("%d
    ",a+b);
    38     return 0;
    39 }
  • 相关阅读:
    poj 1286
    poj 1815
    poj 3368
    十个利用矩阵乘法解决的经典题目
    poj 1026
    hdu 1394
    poj 3270
    poj 2154
    《重构 改善既有代码的设计》读书笔记2
    Android OpenGL ES: 渐变颜色的三角形
  • 原文地址:https://www.cnblogs.com/lalalatianlalu/p/7507128.html
Copyright © 2011-2022 走看看