Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. inline char get(void) {
  2.     static char buf[1000000], *S = buf, *T = buf;
  3.     if (S == T) {
  4.         T = (S = buf) + fread(buf, 1, 1000000, stdin);
  5.         if (S == T) return EOF;
  6.     }
  7.     return *S++;
  8. }
  9. inline void read(ll &x) {
  10.     static char c; x = 0; int sgn = 0;
  11.     for (c = get(); c < '0' || c > '9'; c = get()) if (c == '-') sgn = 1;
  12.     for (; c >= '0' && c <= '9'; c = get()) x = x * 10 + c - '0';
  13.     if (sgn) x = -x;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement