fread () template

buf char [20 is <<. 1], P1 *, P2 *;
#define the GC (P1 && == P2 (P2 = (P1 = buf) + fread (buf, 1,1 << 20 is, stdin), P1 == P2 ) 0:? * p1 ++) // use when submitting
// # define GC getchar () // getchar () for debugging, much slower

inline ll read_64(){ll X=0,w=0; char ch=0;while(!isdigit(ch)) {w|=ch=='-';ch=GC;}while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=GC;return w?-X:X;}//read_64读long long

inline int read_32(){int X=0,w=0; char ch=0;while(!isdigit(ch)) {w|=ch=='-';ch=GC;}while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=GC;return w?-X:X;}//read_32读int

Guess you like

Origin www.cnblogs.com/pepparan/p/11800768.html