Skip to content

Instantly share code, notes, and snippets.

@YangKeao
Last active August 29, 2015 14:03
Show Gist options
  • Save YangKeao/8472b3225d0888173a93 to your computer and use it in GitHub Desktop.
Save YangKeao/8472b3225d0888173a93 to your computer and use it in GitHub Desktop.
输入输出
#include<iostream>
#include<cstdio>
#include<ctype.h>
using namespace std;
inline int readint()
{
char c=getchar();
while(!isdigit(c))c=getchar();
int x=0;
while(isdigit(c))
{
x=x*10+c-'0';
c=getchar();
}
return x;
}
int buf[10];
inline void writeint(int x)
{
int p=0;
if(x==0)p++;
else while(x)
{
buf[p++]=x%10;
x/=10;
}
for(int i=p-1;i>=0;i--)putchar('0'+buf[i]);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment