Created
November 29, 2013 13:08
-
-
Save delta4d/7705490 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unsigned | |
template <class T> inline T fastin() { | |
register char c = 0; | |
register T a = 0; | |
while (c < '0' || c > '9') c = getchar(); | |
while ('0' <= c && c <= '9') a = a * 10 + c - '0', c = getchar(); | |
return a; | |
} | |
// signed | |
template <class T> inline T fastin() { | |
register char c = 0; | |
register T a = 0; | |
T sgn = 1; | |
while (c < '0' || c > '9') { | |
c = getchar(); | |
if (c == '-') sgn = -1; | |
} | |
while ('0' <= c && c <= '9') a = a * 10 + c - '0', c = getchar(); | |
return sgn * a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment