Skip to content

Instantly share code, notes, and snippets.

@YangKeao
Created July 12, 2014 07:34
Show Gist options
  • Save YangKeao/3491f28e046441b92626 to your computer and use it in GitHub Desktop.
Save YangKeao/3491f28e046441b92626 to your computer and use it in GitHub Desktop.
输入
template <class T>
static void read(T &rec)
{
rec=0;
char c;
while((c=getchar())<'0' || c>'9');
while(c>='0' && c<='9')
{
rec=(rec<<3)+(rec<<1)+(c-'0');
c=getchar();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment